Input Output Communication Techniques in Operating System
Input Output Communication Techniques:
The data transfers between the CPU and I/O devices may handle in a variety of techniques. Some techniques use the CPU as an intermediate path, others transfer the data directly to and from the memory unit. The data transfers to and from peripherals that are saying Input-Output communication.
Input-Output Organization in Computer Architecture:
Generally, there are three types of Input-Output communication techniques, These are:
1. Programmed I/O
2. Interrupt-initiated I/O
3. Direct Memory Access (DMA)
In the programmed I/O method, the I/O device doesn’t have direct memory access. The data transfer from an I/O device to memory requires the execution of a program or several instructions by CPU So that this method says Programmed I/O.
In this method, the CPU stays in a program loop until the I/O unit indicates that is ready for data transfer. It is a time-consuming process for the CPU. The programmed I/O method is particularly useful in small low-speed computers. The CPU sends the ‘Read‘ command to the I/O device and waits in the program loop until it receives a response from the I/O device.
The problem with programmed I/O is that the CPU has to wait for the ready signal from the I/O device. The alternative method for this problem is Interrupt-initiated I/O or Interrupt driven I/O. In this method, the CPU issues a read command to the I/O device about the status and then goes on to do some useful work. When the I/O device is ready, the I/O device sends an interrupt signal to the processor.
When the CPU receives the interrupt signal from the I/O device, it checks the status. If the status is ready, then the CPU read the word from the I/O device and writes the word into the main memory. If the operation was done successfully, then the processor goes on to the next instruction.
Direct Access Memory (DMA):
Direct Memory Access (DMA) is a process where the data transforms between the microprocessor (CPU). The memory and peripheral devices are direct without the involvement of the microprocessor (CPU). The CPU first initializes it and the CPU should send some useful information to the DMA controller.
Letting the DMA controller is to manage the memory buses directly. It would improve the speed of data transfer. A chip says a DMA Controller (DMAC) manages this process. The CPU is idle and it has no control over the memory buses. A DMA controller takes over the buses to manage the transfer directly between the I/O device and memory.