IO Systems
IO Systems
• Polling:
• Processor queries I/O device status register
• Loops until it gets status it wants (ready for next command)
• Or tries again a little later
+ Simple
– Waste of processor’s time
• Processor much faster than I/O device
Interrupt-Driven I/O
• Interrupts: alternative to polling
• I/O device generates interrupt when status changes, data ready
• OS handles interrupts just like exceptions (e.g., page faults)
• Identity of interrupting I/O device is recorded in ECR
• ECR: exception cause register
sequences of transfers
DMA DMA IOP
• I/O processor: heavier DMA controller that
executes instructions
• Can be programmed to do complex transfers Main display
Disk NIC
• E.g., programmable network card Memory
DMA and Memory Hierarchy
• DMA is good, but is not without challenges
• RAID 2 strips each byte into 1 bit per disk and uses additional disks
to store Hamming codes for redundancy