+ All Categories
Home > Documents > I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected...

I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected...

Date post: 18-Jan-2018
Category:
Upload: paula-fleming
View: 216 times
Download: 0 times
Share this document with a friend
Description:
I/O Interface unit
29
I/O Organization Competency – C6
Transcript
Page 1: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

I/O Organization

Competency – C6

Page 2: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

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.

Page 3: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

I/O Interface unit

Page 4: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

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.

Page 5: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

Functions of I/O Interface unit3. 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.

Page 6: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

Device Interfacing

Page 7: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

Device Interfacing

• Device Controller – performs device-dependent functions.

• Interface Unit – performs the logic of communicating with the receiver or with the sender.

Page 8: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

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.

Page 9: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

Comm. B/w CPU & Peripheral devices

Page 10: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

I/O Interface

Page 11: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

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 transfer2. Interrupt driven data transfer3. DMA based data transfer

Page 12: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

Program Controlled data transfer

Page 13: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

Program Controlled data transfer

Page 14: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

Program Controlled data transfer

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.

Page 15: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

Program Controlled data transferSeries 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.

Page 16: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

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.

Page 17: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

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.

Page 18: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

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 processI/O interface interrupting process.

Page 19: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

Single Level Interrupt Processing

Page 20: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

Interrupt controlled data transfer

Page 21: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

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)

Page 22: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

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.

Page 23: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

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

Page 24: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

Methods for servicing interrupts

1. Software Polling2. Bus Arbitration3. Daisy chaining which is a hardware

arrangement.4. Vectored interrupt handling5. Use of multiple interrupt lines

Page 25: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

Software Polling

Page 26: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

Bus Arbitration

Page 27: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

Daisy Chaining

Page 28: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

Vectored Interrupts

Page 29: I/O Organization Competency – C6. Important facts to remember when I/O devices are to be connected to CPU There is a vast variety of I/O devices. Some.

Multiple Interrupt lines


Recommended