Logout

6.5.3 Define interrupt and polling.

(No teaching notes for this one.)

JSR Notes:

Here’s a good general point to re-iterate in terms of what the IB wants you to know.  There are if fact different levels what they want you to know, and you need to be prepared for each.  At a very basic level, they want you to be able to define these thing.  And they also want you at a higher level to be able to explain and outline them.  But higher still, they want you to be able to apply them to specific situations.  More on the two higher levels later, but for now appreciate that being well versed at those higher levers does not necessarily mean that you’ve got a good handy definition at the ready, so for 6.5.1, 6.5.2, and 6.5.3, do keep it simple, but accurate.

Interrupt Definition: A signal informing a program that an event has occurred. When a program receives an interrupt signal, it takes a specified action (which can be to ignore the signal). Interrupt signals can cause a program to suspend itself temporarily to service the interrupt.

The one adjustment I’d make to the above definition is that the signal can come from a program or from a piece of hardware, like a printer.

Polling Definition:  There are actually 2, and that’s perfect, since there are two different scenarios, and it’s easy to get them mixed up.  So note that the following two definitions are valid, and are both polling – just different kinds.
Polling is a CAM. In a master/slave scenario, the master queries each slave device in turn as to whether it has any data to transmit. If the slave answers yes then the device is permitted to transmit its data. If the slave answers no then the master moves on and polls the next slave device. The process is repeated continuously. Also see contention and token passing.
(2) Making continuous requests for data from another device. For example, modems that support polling can call another system and request data.

More on the above difference later, but for now the ‘take-away’ point is that where an interrupt is an abrupt demand of the CPU for attention (which can be ignored), with polling it’s rather a polite request for attention that is usually solicited by the CPU.