Interrupt-driven devices are efficient on processor time as they allow the processor to run a program without having to poll the devices. This allows fast devices almost instant access to the processor and stops slow devices from ‘hogging’ the processor. For example, a line printer tends to be slow in printing characters. If the printer only interrupted the processor when it was ready for data then the processor can do other things while the printer is printing the character. Another example can be found in serial communications. Characters sent over an RS-232 link are transmitted and received relatively slowly. In a non-interrupt-driven system the computer must poll the status register to determine if a character has been received, which is inefficient in processor time. But, if the amount of time spent polling the status register is reduced, there is a possibility of the computer missing the received character as another could be sent before the first is read from the receiver buffer. If the serial communications port was set up to interrupt the processor when a new character arrived then it is guaranteed that the processor will always process the receiver buffer.
KeywordsProcessor Time Serial Communication Printing Character Line Printer Interrupt Service Routine
Unable to display preview. Download preview PDF.