The I/O unit is an important component of a computer system. A computer system has many input devices such a keyboard and mouse etc. these devices are different from one another in their organization.
The data transfer rates handled by these devices are also different. They also support different formats of data. It is not possible to connect all these devices directly to the system bus due to these differences.
It is difficult for CPU to control these devices directly as it can waste a lot of CPU time. Suppose a CPU waits for the completion of an I/O operation. It cannot perform any other task during this time. it affects the overall performance of computer.
A special hardware component I/O unit is used to avoid all difficulties. It works as an interface between CPU and I/O devices. It carries out I/O tasks without involving CPU directly. The I/O unit is connected to the bus. The processor and all other devices are connected to the I/O unit.
Responsibilities of I/O Unit
The I/O unit is responsible for the following:
1. It monitors the sates of different devices attached to it.
2. It manages the speed difference between the processor and I/O devices.
Explain different ways of transferring data from peripheral devices to the compute.
Different peripheral device are used to transfer data to computer. The speed of these devices is much slower than processor. A lot of CPU time may be wasted if processor waits for the completion of data transfer. It is very important to transfer data in such a way that computer. The two main ways of transferring data from peripheral devices to computer are:
An interrupt is a signal. In this scheme, the processor issues a command to a I/O device for input or output operation. The device generates an interrupt signal to the processor when it becomes ready. CPU suspends all other processing when it receives an interrupt. CPU then performs I/O operation.
The advantages of this scheme are as follows:
1. It requires on additional hardware.
2. it is simpler to implement.
All other processing is suspended when CPU performs I/O operations. It reduces the overall performance of CPU.
DMA stands fro direct memory access. it uses a hardware compnent known as DMA controller. this scheme transfers data between main memory and I/O devices without using CPU. The processor issues I/O command when data transfer is required. it can perform other processing after issuing the command. the data is transferred between main memory and I/O device. the I/O unit issues a signal to CPU when data transfer is complete.
this scheme increases the overall performance of CPU because CPU does not need to wait for the completion of I/O operation.
The disadvantages of this scheme are as follows:
1. It is more complex.
2. It also requires more hardware.