Download presentation
Presentation is loading. Please wait.
Published byPaula Fleming Modified over 9 years ago
1
I/O Organization Competency – C6
2
Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some devices (keyboard and mouse) are very slow, whereas others(disks and flash memory) are much faster. The method of data transfer differs from device to device. I/O devices transfer data at slower rate than CPU and memory. The number of data bytes and their formats differ from one device to another.
3
I/O Interface unit
4
Functions of I/O Interface unit 1.To receive read/write instructions from CPU, interpret them and send appropriate commands to the specified I/O device. 2. For a write command, temporarily store the data received from the main memory. Inform the specified device about the readiness of the data. When the device is ready, it accepts the data from the buffer.
5
Functions of I/O Interface unit 3.For a read instruction received from the CPU, send a command to the specified device. When requested data is received from it, put the data in a buffer and inform the CPU that the data is ready. CPU should now start accepting data from the buffer. 3. Monitor errors during transmission, correct it and inform CPU if data is corrupted. 4. Control all I/O operations.
6
Device Interfacing
7
Device Controller – performs device-dependent functions. Interface Unit – performs the logic of communicating with the receiver or with the sender.
8
Device Interfacing A computer system contains many I/O devices. Each I/O device will be assigned an unique address for identification. The interface units of various I/O devices are connected to rest of the computer system using a system bus.
9
Comm. B/w CPU & Peripheral devices
10
I/O Interface
11
I/O Methods Three methods are possible when data is to be transferred from I/O units to or from memory. 1.Program Controlled data transfer 2. Interrupt driven data transfer 3. DMA based data transfer
12
Program Controlled data transfer
14
The Interface unit has the following registers: 1.IBR : Interface Buffer Register 2. Data-Ready: Flip-flop that indicates that data is ready in the IBR. 3. Busy: Flip-flop that indicates that the I/O interface unit is engaged.
15
Program Controlled data transfer Series of steps involved data transfer: 1.An I/O instruction is encountered in the program being executed. 2. The CPU sends the device address and command(read or write) to be executed on the I/O bus. 3. The device address on the I/O bus is decoded by the address decoder to recognize the desired I/O device.
16
Series of steps involved data transfer: 4. The interface unit commands the concerned device controller to assemble a word in the IBR. At the sane time it turns on an interface busy flip-flop and data ready flip-flop is reset to 0. 5. The device controller fills the IBR. As soon as the data is ready in IBR the ready flip-flop of the device interface is set to 1.
17
Series of steps involved data transfer: 6. The CPU continually checks the data ready flip-flop in a wait loop. When the ready flip-flop is set to 1, the contents of IBR are transferred to the specified CPU register through the data bus.
18
Interrupt Structures Interrupt process may be compared to the action of housewife. Two processes: Interrupted Process Interrupting Process I/O transfer between CPU and the I/O – CPU interrupted process I/O interface interrupting process.
19
Single Level Interrupt Processing
20
Interrupt controlled data transfer
21
Interrupt Types CPU should handle a variety of interrupts from many I/O devices. External Interrupts: Interrupt caused by I/O devices and emergency events outside CPU’s control. Internal Interrupts: Also named as Trap. Occur when there is a mistake in a user’s program. (Divide by zero, Accumulator overflow or use of illegal operation code)
22
Interrupt Types The number of types of interrupts that can be distinguished by a CPU is called Interrupt Levels or Interrupt Classes. The relative importance given to an interrupt is called its priority.
23
Handling Multiple interrupts ( Handshaking between CPU and I/O Interface Unit ) Handshaking – The procedure of exchanging signals between processes to communicate each other’s state
24
Methods for servicing interrupts 1. Software Polling 2. Bus Arbitration 3. Daisy chaining which is a hardware arrangement. 4. Vectored interrupt handling 5. Use of multiple interrupt lines
25
Software Polling
26
Bus Arbitration
27
Daisy Chaining
28
Vectored Interrupts
29
Multiple Interrupt lines
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.