Quiz 1 Flashcards
Four components of computer system
Hardware, Application programs, OS, Users
OS is a ____ allocator and a ____ program
resource allocator and control program
One program running at all times on the computer
Kernel
- central component of most OS
- bridge between apps and data processing
- manages systems resources
+ Everything else is a system program or app program
Loaded at power-up or reboot
Firmware
- initializes all aspects of system
- loads OS kernel & starts execution
Manages I/O for a Device Controller.
Provides uniform interface between controller and kernel
Device Driver
In charge of a particular device type.
Each has a local buffer.
Informs CPU that it has finished its operation and causes an interrupt
Device Controller
Event occurrence is signaled with an ____
Interrupt
- OS is interrupt driven
Hardware vs Software Interrupts
Hardware and software
H) interrupt to the CPU through the bus
S) Executes system call
Interrupt Vector
contains the addresses of all the service routines
Trap or Exception
software-generated interrupt caused by an error or user request for operating system service (privileged, see kernel mode)
Two types of interrupts
Polling and Vectored
P) interrupt controller must poll each device
V) interrupt signal includes the device identity
Register that specifies the next instruction to execute
Program Counter
Request to the OS to allow user to wait for I/O completion
System Call
Device Controller transfers blocks of data from buffer directly to main memory w/out CPU intervention.
Only one interrupt per block opposed to one per byte
Direct Memory Access
Storage-Device Hierarchy
- Registers
- Cache
- Main Memory
- Solid-State Disk (secondary storage)
- Hard Disk (secondary storage)
- Optical Disk (tertiary storage)
- Magnetic Tapes (tertiary storage)
Storage Performance
- Register: managed by compiler, backed by cache, 0.25-0.5 ns.
- Cache: managed by hardware, backed by main memory, 0.5-25 ns.
- Main memory: managed by OS, backed by disk, 80-250 ns
- Solid-state disk: managed by OS, backed by disk, 25,000-50,000 ns
- Magnetic disk: managed by OS, backed by disk or tape, 5,000,000 ns
Contains entry for each I/O device indicating its type, address, and state
Device-status table
Multiprocessor Systems (parallel systems, tightly-coupled systems) advantages
Increased throughput
Economy of scale
Increased reliability
Increases the CPU utilization by organizing jobs so CPU always has one job to execute.
Job selected & run by Job Scheduling
Multiprogramming (Batch System)
CPU switches jobs so frequently that users can interact with each job while it is running (interactive computing)
Timesharing (multitasking)
Two types of multiprocessors
Asymmetric: master-slave, slave wait for master run its tasks
Symmetric: all processors execute all tasks
Dual-mode (User mode & Kernel mode)
System call changes mode to kernel (mode bit = 0), return from call resets it to user (mode bit = 1)
-User trying to execute privileged instruction raises “trap”
Passive entity vs Active entity
Program is passive, process is active.
To execute a program all (or part) of the instructions must be in memory.
All (or part) of the data that is needed by the program must be in memory.
Memory Management