• Accessing I/O Devices • I/O interface • Input/output mechanism
Memory-mapped I/O y pp / Programmed I/O Interrupts Direct Memory Access
• Buses
Synchronous Bus Asynchronous Bus
I/O in CO and O/S
• • • Programmed I/O Interrupts DMA (Direct memory Access)
A bus is a shared communication link, which uses one , set of wires to connect multiple subsystems. The two major advantages of the bus organization are versatility and low cost.
Accessing I/O Devices
• Most modern computers use single bus arrangement for connecting I/O devices to CPU & Memory • The bus enables all the devices connected to it to exchange information • Bus consists of 3 set of lines : Address, Data, Control • Processor places a particular address (unique for an I/O Dev.) on address lines • Device which recognizes this address responds to the commands issued on the Control lines • Processor requests for either Read / Write • The data will be placed on Data lines
Hardware to connect I/O devices to b t bus
• Interface Circuit – Address Decoder – Control Circuits – Data registers – Status registers
• The Registers in I/O Interface – buffer and control • Flags in Status Registers like SIN, SOUT Registers, SIN • Data Registers, like Data-IN, Data-OUT
I/O interface for an input device
Memory
Address
Processor
Data Control
Address Add Decoders
Control C t l circuits
Data d t t D t and status registers
I/O /O Interface
Input device (s) p ( )
Input Output mechanism h i
• Memory mapped I/O • Programmed I/O • Interrupts • DMA (Direct memory Access)
A bus generally contains a set of control lines and a set of data lines. The control lines are used to signal requests and acknowledgments, and to indicate what type of information is on the data lines. The control lines are used to indicate what the bus contains and to implement the bus protocol. The data lines of the bus carry information between the source and the