Computer-System Operation
• I/O devices and the CPU can execute
concurrently
• Each device controller is in charge of a particular
device type
• Each device controller has a local buffer
• CPU moves data from/to main memory to/from
local buffers
• I/O is from the device to local buffer of controller
• Device controller informs CPU that it has finished
its operation by causing an interrupt
Computer System Organization
• Computer-system operation
– One or more CPUs, device controllers connect through common bus providing
access to shared memory
– Concurrent execution of CPUs and devices competing for memory cycles
Operating-System Operations
• Dual-Mode Operation
Dual-mode operation allows OS to protect itself and other system components.
User mode and kernel mode Mode bit provided by hardware Provides ability to
distinguish when system is running user code or kernel code.
Some instructions designated as privileged, only executable in kernel mode.
System call changes mode to kernel, return from call resets it to user Transition
from User to Kernel Mode
• Timer to prevent infinite loop / process hogging resources Set interrupt
after specific period
• Operating system decrements counter
• When counter zero generate an interrupt
• Set up before scheduling process to regain control or terminate program
that exceeds allotted time