Home | Computer | I/O Interface (Interrupt and DMA Mode)-Modes of Transferred

I/O Interface (Interrupt and DMA Mode)-Modes of Transferred

August 28, 2022

Different peripheral devices are used to transfer data to the computer. The speed of these devices is much slower than the processor. A lot of CPU time may be wasted if the processor waits for the completion of the data transfer. (It is very important to transfer data in such a way that CPU time may not be wasted while data is being transferred from the peripheral device to the computer.

Modes of Transferred

Different ways of transferring data from peripheral devices to computers are:

Interrupts

An interrupt is a signal. In this scheme, the processor tells an I/O device what to do, and then the device interrupts the processor when it’s done. CPU suspends all other processing when it receives an interrupt. CPU then performs I/O operation.

Advantages

The advantages of this scheme are as follows:

Disadvantages

All other processing is suspended when the CPU performs I/O operations. It reduces the overall performance of the CPU.

DMA (Direct Memory Access)

DMA stands for Direct Memory Access. It uses a hardware component known as a DMA controller. This scheme transfers data between main memory and I/O devices with wing CPU. The processor issues an I/O command when data transfer is required. It de performs other processing after issuing the command. The data is transferred between the main memory and the I/O device The I/O unit issues a signal to the CPU when the data transfer is complete.

Advantage

This scheme increases the overall performance of the CPU because the CPU does not need to wait for the completion of the I/O operation

Disadvantages

The disadvantages of this scheme are as follows

  • It is more complex
  • It also requires more hardware.

Program I/O

Transferring data from a register to memory and vice-versa is an integral part of every computer program. These data transfers are carried out as per the instructions given in the source code of a program. The data transfer instruction is used to move data from a particular memory location to a CPU register and vice-versa.

A number of registers are present in the CPU. They are used in this data transfer to gather information and perform the transfer. The actions to be taken in the next instruction are stored at the same time in the CPU registers. Hence, the CPU does not require repeated interrupts for any action. The processor starts executing the next instruction and transfers the data as per the previous instruction.