Input-Output When the processor is executing a program and encounters an instruction relating to I/O, it executes that instruction by issuing a command to the appropriate I/O module.

Interrupt-Driven I/O

In interrupt-driven I/O, The I/O module will then interrupt the processor to request service when it is ready to exchange data with the processor. The processor then executes the data transfer, as before, and resumes its former processing.

  • This frees up the processor to do other work, doesn’t need to constantly check on I/O module
  • The process will be BLOCKED, processor can execute other processes

Why interrupt-driven I/O?

Interrupt mechanism eliminates need for processor to periodically check on I/O (i.e. remove need for busy waiting).

Limitations

Interrupt-driven I/O, though more efficient than O, still requires the active intervention of the processor to transfer data between memory and an I/O module, and any data transfer must traverse a path through the processor.

Thus, both O and O suffer from two inherent drawbacks:

  1. The I/O transfer rate is limited by the speed with which the processor can test and service a device
  2. The processor is tied up in managing an I/O transfer; a number of instructions must be executed for each I/O transfer

This is why a more efficient technique is DMA.

From ECE222

I/O interrupts have the following characteristics:

  • Information such as which device has interrupted, what priority/urgency, etc needs to be communicated
  • This information is communicated by using Vectored Interrupts or an exception identification register (SCAUSE as in RISC-V)

When processor recognizes interrupt the device sends vector address or a status field to place in the cause register. As a result the OS gets control and can interrogate the device.