What is an interrupt? Part-1

Bookmark and Share

The concept of “Interrupt” is purely based on common-sense. To give you an example, imagine a parallel port in your PC being connected to a printer. During a print operation in progress, the CPU supplies characters to the parallel port (to be passed onto the printer) at a periodic rate. Say, the parallel port runs out of data after printing 1000 characters. Now the parallel port starts to “starve” for more characters. The processors job is to identify the hungry parallel port and feed it with more characters. Here comes the concept of “interrupt”.

“Interrupt” is a signal used by an I/O device (like a parallel port) to inform the CPU that it has to feed the parallel port with more characters. As soon as the interrupt signal (an output of the I/O device) is received, the processor devotes it’s attention towards the corresponding I/O device. In the above example, the CPU then does a “write” operation to the parallel port.

Similarly, an interrupt could be signalled by an I/O device (say a floppy disk-controller) indicating that it is completely filled with data and hence the CPU may initiate a “read” operation, to retrieve the data.

Usually, the microprocessors have only one input request line. Hence it is not possible to connect all the interrupt request lines from various I/O devices directly to this single input. They are rather connected to a device called interrupt controller.

How does the interrupt-signaling process occur?

Continue reading “What is an interrupt? Part-1”