Logout

6.5.5 Compare the features of DMA, interrupt systems and polling systems.

Teaching Notes:
Students must cover an evernt or external device interrupt as well as a polling system. Knowledge of specific interrupt codes is not required.

JSR Notes:

The textbook does as good a job as it can with this assessment statement.  DMA really doesn’t fit nicely with the other two; it’s particularly the other two that need to be compared.

Firstly though a little reiteration of DMA, for what it’s worth.  It is a special system that is set up expressly for primarily one purpose: backing up.  So to compare it to interrupt systems and polling, well it’s for something entirely different for the most part. 

So, comparing the two that would demand it (in the case of the interrupt), or politely wait for a request to do so (in the case of polling.)….

Interrupts are to be preferred when the action should happen as soon as possible.  Worthy of note at this point is that interrupts have certain priorities (and this is noted in the teaching note above).  So just because a certain interrupt is sent from a device or a program, it does not mean that everything comes to a screeching halt until the issue has been resolved.  Rather it just means that the request in question is initiated by the device/program.  And the reason it is done is that it very well could be something that if left unattended, could screw up other things/processes.  And since interrupts have certain set priorities (there are 256 different kinds of software interrupts, for example, each with its own priority level), the CPU will by definition attend to the things first that it should attend to first.

Meantime, the poll is (in the first instance) a request for requests, as it were.  It is something initiated at regular intervals by the CPU.  So the CPU will poll devices and applications to see if they have any request.  The applications, in turn collect their requests in anticipation of the regular check-in by the CPU.

The advantage of the interrupt method is that there is no lag time to when the CPU is to make its decision about what to do or not.  And it doesn’t require regular processing by the CPU when there is no problem.  So for urgent things that don’t happen too regularly, it works fine.  But you can imagine that if it were overused, then it would be a burden.  In the analogy of Dr. Bieber in his office, imagine if every minute of every day members of the school community were lined up outside his door demanding his attention.

So the advantage of the poll system is that the CPU can turn it’s attention to “outside” requests, when it’s got the time.  The only disadvantage of this is that it will often time waste its energy requesting the requests, as it were, since often times there will be no requests waiting.

A balance between interrupts for decidedly urgent requests, and polling by the CPU, regularly, is the best overall way to go.

 

And at this point do recall the second definition of polling; one of continuous requests by one device of another.  This would not happen between modem and CPU for example, but it could between modem and Internet Service Provider, while the user is connected to the Internet.  The idea here is that the request for data is continuously made, but unlike an interrupt, the asking device does not need to take over CPU control, it is simply asking the same thing again, in the case of this example, for data from the ISP.  This sort of polite request is expected by the other device.

 

Note that you should have a specific external device interrupt example ready, and also a polling example ready, but you can use the ones form 6.5.4 for this.  With this assessment statement you should be more focused on the comparison of interrupt and polling, as was done above.