0
20kviews
Explain advantages of interrupt driven I\O over polling. Explain interrupt driven I/O access with one example.

Mumbai University > Electronics Engineering > Sem6 > Computer Organization

Marks: 10M

Year: Dec 2015

1 Answer
0
889views
  • An interrupt is a condition that makes the CPU suspend the current program and execute an ISR.
  • An ISR (Interrupt Service Routine) is a specially written program to service the condition caused the interrupt.
  • After an interrupt is serviced, the CPU returns to the main program, exactly at the next instruction where it had left.
  • In interrupt driven data transfer, whenever I/O device is ready for the data transfer, it will interrupt the CPU. In the ISR, the CPU will perform the data transfer.
  • This method is better than polling because here the CPU does not have to waste time in checking the status of the I/O device.
  • The interrupt driven I/O access can be explained with the example of keyboard.

enter image description here

  • Instead of CPU checking, when the data is available on the keyboard, the keyboard should interrupt the CPU when a key is pressed. Thus time will not be wasted in repeatedly checking the keyboard when the user is not typing at all.
  • The I/O device that request an interrupt by sending $\overline{INTR}$ signal to the CPU.
  • Whenever CPU receives $\overline{INTR}$ signal, it completes the execution of the current instruction and then executes the ISR. When CPU is ready then it send acknowledge signal through INTA line.
  • ISR gets executed and CPU returns to the main program.
  • I/O devices turns off the $\overline{INTR}$ signal after execution.
Please log in to add an answer.