Chapter 1 - Principles of Operating Systems

0.0(0)
studied byStudied by 0 people
full-widthCall with Kai
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/157

flashcard set

Earn XP

Description and Tags

Midterm reviewer

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

158 Terms

1
New cards

Operating System (OS)

acts as intermediary between user of a computer and the computer hardware

2
New cards

Operating system goals

  • Execute user programs and make solving user problems easier

  • Make the computer system convenient to use

  • Use the computer hardware in an efficient manner

3
New cards

Hardware

provides basic computing resources; CPU, memory, I/O devices

4
New cards

Operating System (OS)

controls and coordinates use of hardware among various applications and users

5
New cards

Application programs

ways in which the system resources are used to solve computing problems

  • word processors, compilers, web browsers, database systems, video games 

6
New cards

Users

people, machines, other computers

7
New cards

Abstract view of component of computer

<p></p>
8
New cards

ease of use, good performance

Fill in the blanks:

Users want convenience, ______ and ____ ________

9
New cards

resource utilization

Fill in the blanks:

Users don’t care about _________.

10
New cards

mainframe or minicomputer

Fill in the blanks:

But shared computer such as ________ or ________ must keep all users happy

11
New cards

resource allocator, control program

Fill in the blanks:
Operating system is a ________ and ______ making efficient use of HW and managing execution of user programs.

12
New cards

Workstations

have dedicated resources but frequently use shared resources from servers

13
New cards

Mobile devices (e.g. smartphones and tablets)

are resource poor, optimized for usability and battery life

14
New cards

Mobile user interfaces

touch screens, voice recognition, etc.

15
New cards

Embedded computers

have little or no user interface; run without user intervention

16
New cards

Roles of Operating Systems

  • because of designs and uses of it

  • present in toasters through ships, spacecraft, game machines, TVs, and industrial control systems

  • born when fixed use computers for military became more general purpose and needed resource management and program control

17
New cards

True

True or False
An operating system has no universal accepted definition. “Everything a vendor ships when you order an operating system” is a good approximation, but it varies wildly.

18
New cards

Kernel

one program running at all times on the computer

19
New cards

System program

ships with the OS, but not part of the kernel

20
New cards

Application program

all programs not associated with the OS

21
New cards

Middleware

set of software frameworks that provide addition services to application developers, such as databases, multimedia, graphics, etc.

22
New cards

Bus

Connects one or more CPUs or device controllers to provide access to shared memory

23
New cards

Computer-system operation

  • Concurrent execution of CPUs and devices competing for memory cycles

  • One or more CPUs, device controllers connect through common bus providing access to shared memory

24
New cards

Computer System Organization (Overview of Computer System Structure

knowt flashcard image
25
New cards

Concurrently

Fill in the blanks:

I/O devices and the CPU can execute ______.

26
New cards

Local buffer

Fill in the blank:

Each device controller has a ______ and is in charge of a particular device type

27
New cards

Device driver

Fill in the blank:

Each device controller type has an operating system _____ to mange it.

28
New cards
29
New cards

main memory, local buffers

Fill in the blanks:

CPU moves data from/to _______ to/from local buffers

30
New cards

I/O

is from the devices to local buffer of controller

31
New cards

Device controller

informs CPU that it has finished its operation by causing an interrupt

32
New cards

Interrupt

transfers control to the interrupt service routine

33
New cards

Interrupt Vector

contains the addresses of all the service routines

34
New cards

Interrupt architecture

must save the address of the interrupted instruction

35
New cards

Trap or exception

a software-generated interrupt caused either by error or a user request

36
New cards

interrupt driven

Fill in the blank:

An operating system is _____.

37
New cards

Interrupt Timeline

knowt flashcard image
38
New cards

Interrupt handling

  • The OS preserves the state of the CPU by storing the registers and the program counter

  • Determines which type of interrupt has occurred

  • Separate segments of code determine what action should be taken for each type of interrupt

39
New cards

Interrupt-drive I/O Cycle

knowt flashcard image
40
New cards

Two methods for handling I/O

  • After I/O starts, control return to user program only upon I/O completion

  • After I/O starts, control returns to user program without waiting for I/O completion

41
New cards

Only upon completion (after I/O starts; under I/O structure)

  • wait instruction idles the CPU until the next interrupt

  • wait loop (contention for memory access)

  • at most one I/O request is outstanding at a time, no simultaneous I/O processing

42
New cards

without waiting (after I/O starts; under I/O structure)

  • System call - request to the OS to allow user to wait for I/O completion

  • Device-status table contains entry for each I/O device indicating its type, address, and state

  • OS indexes into I/O device table to determine device status and to modify table entry to include interrupt

43
New cards

Wait loop

contention for memory access

44
New cards

System call

request to the OS to allow user to wait for I/O completion

45
New cards

Device-status table

contains entry for each I/O device indicating its type, address, and state

46
New cards

Main memory

only large storage media that the CPU can access directly

  • random access

  • volatile

  • dynamic random-access memory

47
New cards

Secondary storage

extension of main memory that provides large non-volatile storage capacity

48
New cards

Hard disk drives (HDD)

rigid metal or glass platters covered with magnetic recording material

49
New cards

tracks, sectors

Fill in the blanks:

Disk surface is logically divided into ____, which are subdivided into ____.

50
New cards

Disk controller

determines the logical interaction between the device and the computer

51
New cards

Non-volatile memory (NVM) devices

faster than hard disks, non-volatile. has various technologies. more popular as capacity and performance increases, price drops.

52
New cards

Storage hierarchy

Storage systems organized in hierarchy:

  • Speed

  • Cost

  • Volatility

53
New cards

Caching

copying information into faster storage system; main memory can be viewed as a cache for secondary storage

54
New cards

Device driver

provides uniform interface between controller and kernel; for each device controller to manage I/O

55
New cards

Storage-device hierarchy

knowt flashcard image
56
New cards

von Neumann architecture

knowt flashcard image
57
New cards

Direct Memory Access Structure

  • Used for high-speed I/O devices able to transmit information at close to memory speeds

  • Device controller transfers blocks of data from buffer storage directly to main memory without CPU intervention

  • Only one interrupt is generated per block, rather than the one interrupt per byte

58
New cards

Device controller

transfers block of data from buffer storage directly to main memory without CPU intervention

59
New cards

Bootstrap program

simple code to initialize the system, load the kernel

60
New cards

System daemons

services provided outside of the kernel

61
New cards

Kernel interrupt driven

  • hardware interrupt by one of the devices

  • software interrupt (exception or trap)

    • software error

    • request for operating system service — system call

    • other process problems include infinite loop, processes modifying each other or the operating system

62
New cards

System call

request for operating system service

63
New cards

Multiprogramming

organizes jobs (code and data) so CPU always has one to execute

64
New cards

Job scheduling

one job selected and run via ____

65
New cards

subset of total jobs

A ______ in system is kept in memory

66
New cards

switches to

When job has to wait, OS ___ another job

67
New cards

Multitasking

A logical extension of batch systems — the CPU switches jobs so frequently that users can interact with each job while it is running, creating interactive computing

68
New cards

less than a second (< 1 sec)

Response time should be _______

69
New cards

Process

each user has at least one program executing in memory

70
New cards

CPU scheduling

if several jobs ready to run at the same time

71
New cards

Swapping

If processes don’t fit in memory, _____ moves them in and out to run

72
New cards

Virtual memory

allows execution of processes not completely in memory

73
New cards

Memory Layout for Multiprogrammed System

knowt flashcard image
74
New cards

Dual-mode operation

allows OS to protect itself and other system components

  • User mode

  • Kernel mode

75
New cards

Mode bit

provides ability to distinguish when system is running user code or kernel code

76
New cards

Mode bit is user

When a user is running

77
New cards

Mode bit is kernel

When kernel code is executing

78
New cards

True

True or False

System call changes mode to kernel, return from call resets it to user, so it is guaranteed the user does not explicitly set the mode bit to kernel.

79
New cards

Privileged

only executable in kernel mode

80
New cards

Transition from user to kernel mode

knowt flashcard image
81
New cards

Timer

prevents infinite loop or process hogging resources

82
New cards

Process

  • a program in execution

  • a unit of work within the system

  • active entity

  • needs resources to accomplish task

83
New cards

Program

a passive entity

84
New cards

Process termination

requires reclaim of any reusable resources

85
New cards

Single-threaded process

has one program counter, specifying location of next instruction to execute

86
New cards

Process

executes instructions sequentially (one at a time) until completion

87
New cards

Multi-threaded process

has one program counter per thread

88
New cards

Concurrency

Multiplexing the CPUs among the processes/threads

89
New cards

Process Managemenet Activities

  • Create & delete both user and system process

  • Suspend & resume processes

  • Provide mechanisms for:

    • process synchronization

    • process communication

    • deadlock handling

90
New cards

Memory management

  • determines what is in memory

  • To execute a program, all or part of the instructions must be in memory

91
New cards

Memory management activities

  • keep track of which parts of memory are currently used and by whom

  • decide which processes and data to move into and out of memory

  • allocate & deallocate memory space as needed

92
New cards

File

abstracts physical properties to logical storage unit

  • each medium is controlled by device (i.e., disk drive, tape drive). 

    • varying properties include access speed, capacity, data-transfer rate, access method (sequential or random)

93
New cards

File-system management

files organized into directories

94
New cards

Access control

determine who can access what

95
New cards

OS activities (file-system management)

  • create & delete files/dirs

  • primitives to manipulate files/dirs

  • mapping files onto secondary storage

  • backup files onto stable (non-volatile) storage media

96
New cards

Mass-storage management

disks used to store data that does not fit in main memory or data must be kept for a long period of time

97
New cards

disk subsytem, algorithms

Entire speed of computer operation hinges on _____ and its ______.

98
New cards

OS activities (mass-storage management)

  • Mounting and unmounting

  • Free-space management

  • Storage allocation

  • Disk scheduling

  • Partitionning

  • Protection

99
New cards

Caching

  • performed at many levels in a computer

  • copied from slower to faster storage temporarily

  • faster storage checked first to determine if info is there

    • if yes, info used directly from the cache

    • if no, data copied to cache and used there

  • cache smaller than storage being cached

    • cache management important design problem

    • cache size and replacement policy

100
New cards

Characteristics of Various Types of Storage

knowt flashcard image