
1
๎๎๎๎๎๎
๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎
๎๎๎๎๎
๎๎๎๎๎๎๎๎๎๎๎
๎๎๎๎
โ Terms and definitions
โ Basic concepts
2
๎๎๎๎๎๎
๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎
๎๎๎๎๎๎๎
๎๎๎๎
โ I/O subsystem
โcomponent of the OS that implements the application โ I/O device
interface
โ Port
โconnection point for an I/O device with the computer
โconsists of data-in, data-out, status, and control registers
โ Bus
โset of wires with protocol for what can be transferred on the bus
โPCI, PCI-X, PCIe, SCSI, HyperTransport, etc.
โ Controller
โcircuit to operate a port, a bus, or a device
โeach device controller provides registers for the CPU to send data
and controls signals to that device
3
๎๎๎๎๎๎
๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎
๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎
๎๎๎๎
๎๎๎
4
๎๎๎๎๎๎
๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎
๎๎๎๎๎๎๎๎๎๎๎๎๎๎
โ Polling
โduring I/O, the computer does nothing but constantly monitor the
status register
โno other way to determine device status
โinefficient, wastes CPU resources
โ Interrupts
โdevice asynchronously notifies the CPU on status changes
โI/O devices produce hardware interrupt, software interrupt is a
synchronous event in software
โsave current execution state (context switch) and begin execution
of an interrupt service routine (interrupt handler)
โCPU typically provides 1-2 pins for indicating interrupts
โinterrupts have priorities, may be maskable
โefficient