Difference between Programmed I/O and Interrupt Driven I/O

Programmed I/O:

I/O operations will mean a data transfer between an I/O device and memory or between an I/O device and the processor. If in any computer system I/O operations are completely controlled by the processor, then that system is said to be using ‘Programmed I/O‘.

Difference between Programmed IO and Interrupt Driven IO

When such a technique is used, the processor executes programs that initiate, direct and terminate the I/O operations, including sensing device status, sending a read or write command and transferring the data. It is the responsibility of the processor to periodically check the status of the I/O system until it finds that the operation is complete.

Interrupt Driven I/O:

It can be avoided by using an interrupt facility and special commands to inform the interface to issue an interrupt request signal when the data are available from the device. In the meantime, the CPU can proceed to execute another program.

Difference between Programmed IO and Interrupt Driven IO

Programmed I/O vs Interrupt Driven I/O:

Programmed I/O
Interrupt Driven I/O
1. In programmed I/O device in sequence and in effect ‘ask’ each one if it needs communication with the processor. This checking is achieved by continuous polling cycle and hence processor cannot execute other instructions in sequence.1. External asynchronous input is used to tell the processor that I/O device needs its service and hence processor does not have to check whether I/O device needs it service or not.
2. It is implemented without interrupt hardware support.2. It is implemented using interrupt hardware support.
3. It does not depend on interrupt status.3. Interrupt must be enabled to process interrupt driven I/O.
4. During polling processor is busy and therefore, has serious and decremental effect on system throughput.
4. In interrupt driven I/O, the processor is allowed to execute its instructions in sequence and only stop to service I/O device when it is told to do so by the device itself. This increase system throughput.
5. It does not need initialization of stack.5. It needs initialization of stack.
6. System throughput decreases as number of I/O devices connected in the system increases.6. System throughput does not depend in the system.