Differences in lo devices ☆ Application Disk used to store files requires file-management software Disk used to store virtual memory pages needs special hardware and software to support it Terminal used by system administrator may have a higher priority than an ordinary user DEVICE MANAGEMENT
DEVICE MANAGEMENT Differences in I/O Devices ❖Application ٭ Disk used to store files requires file-management software ٭ Disk used to store virtual memory pages needs special hardware and software to support it ٭ Terminal used by system administrator may have a higher priority than an ordinary user
Differences in o devices complexity of control ☆ Unit of transfer Data may be transferred as a stream of bytes for a terminal or in larger blocks for a disk ☆ Data representation s Encoding schemes ☆ Error conditions Devices respond to errors differently DEVICE MANAGEMENT
DEVICE MANAGEMENT Differences in I/O Devices ❖Complexity of control ❖Unit of transfer ٭ Data may be transferred as a stream of bytes for a terminal or in larger blocks for a disk ❖Data representation ٭ Encoding schemes ❖Error conditions ٭ Devices respond to errors differently
0) 4.2 Techniques for Performing 10(p453 11 2) s Cyclic Test /Programmed ◇ Interrupt-Driven ☆ DMA Control DEVICE MANAGEMENT
DEVICE MANAGEMENT 4.2 Techniques for Performing I/O (p453 11.2) ❖Cyclic Test /Programmed ❖Interrupt-Driven ❖DMA Control
Programmed 10--P29 Issue Re ad command to CPL→LO IAO module ☆Ⅳ O module performs the action,not Read status the processor vO IO→CPU module ☆ Sets app ropriate bits in the vo Error status register status condition Ready ☆ No interrupts occur Read word from vc IO→CP Module Processor checks status until Write word operation is complete CP→ memor into memory ☆Busy- waits Yes Next instruction (a) Programmed IO DEVICE MANAGEMENT
DEVICE MANAGEMENT Programmed I/O --P29. ❖I/O module performs the action, not the processor ❖Sets appropriate bits in the I/O status register ❖No interrupts occur ❖Processor checks status until operation is complete ❖Busy-waits
Interrupt-Driven 10 Issue Read CpU→O s Processor is interrupted when 1O command to Do some thi IO module module ready to exchange data Read status Interrupt of wo Processor is free to do other work module IO→Cp ☆ No needless waiting Error status condition Ready s Consumes a lot of processor time Read word from Io IO→CPU because every word read or written Module passes through the processor Write word CPU→ memory into memory Done Next instruction (b)Interrupt-driven LO DEVICE MANAGEMENT
DEVICE MANAGEMENT Interrupt-Driven I/O ❖Processor is interrupted when I/O module ready to exchange data ❖Processor is free to do other work ❖No needless waiting ❖Consumes a lot of processor time because every word read or written passes through the processor