[email protected] [Mobile: 9869 488 356]
Mukesh N. Tekwani
I/O MODULES Page 4 of 6
· initiation of Input/Output operation (interrupt issued by I/O devices)
· completion of an Input/Output operation
· occurrence of hardware or software errors.
Interrupts can be generated by various sources internal or external to the CPU.
In the interrupt driven I/O the processor issues a READ/WRITE instruction to the device
and then continues doing its task. When the interface buffer is full, and it is ready to send
data to the processor, the interface sends a signal to the processor informing it that data is
ready. This signal is called as the interrupt signal. When the processor receives the
interrupt signal, it knows that the data is ready; it suspends its current job and transfers
data from buffer to its own registers.
Disadvantages of Interrupt–driven I/O technique:
The processor must suspend its work and later resume it. If there are many devices, each
can issue an interrupt and the processor must be able to attend each of these, based on
some priority.
The role of the processor in interrupt-driven I/O:
When an I/O device is ready to send data, the following events occur:
1. The device issues an interrupt signal to the processor.
2. The processor finishes execution of the current instruction. It then responds to the
interrupt signal.
3. The processor sends an acknowledgement signal to the device that sent the
interrupt. The device then removes its interrupt signal.
4. The processor must save the state of the current task(i.e., the values of registers,
the address of the next instruction to be executed, etc). These are saved onto a
stack.
5. The processor then attends to the device that issued to the interrupt signal.
6. When interrupt processing is over the saved registers are retrieved from the stack
and the processor continues its previous task from the point where it was last
stopped.
When the processor detects an interrupt, it executes an interrupt-service routine. This
routine polls each I/O device to determine which device caused the interrupt. This
technique is called software poll.
Generated by Foxit PDF Creator © Foxit Software
http://www.foxitsoftware.com For evaluation only.