What is a nested interrupt? What are the advantages and disadvantages of nested interrupts?

What will be an ideal response?

A nested interrupt (like a nested subroutine) is an interrupt that is entirely embedded in another. For example,
suppose the keyboard generates an interrupt. This interrupt is accepted (if no higher priority interrupt is pending).
Now, suppose that a higher priority interrupt, such as a disk drive, occurs while the keyboard interrupt is in
progress. If nested interrupts are implemented, the new higher?priority interrupt is processed. When that has
been done, a return is made to the original interrupt handling routine (i.e., the keyboard handler). When that has
been finished, a second return is made to the original program.
The advantage of nested routines is that a high priority device can interrupt a low priority device. This ensures
efficiency and reduces the probability of lost data.
The disadvantage of nested routines is that it is possible that a low?priority interrupt will not be serviced if there
are too many high?priority interrupts (i.e., the system is not fair). Another problem is that the return address and
any working registers must be saved each time a new interrupt is received. Suppose you have a system with 32
registers and you save 16 on each interrupt call. If 10 nested interrupts are received (i.e., ten interrupts, each one
with a higher priority than the previous one) then 32 × 10 registers have to be saved in memory together with 10
return address and 10 status registers. On each return, the data must be restored. Consequently, in this (extreme)
example, there are 360 memory read/writes, which is a considerable overhead.

Computer Science & Information Technology

You might also like to view...

List the categories of loops used in VBA and describe each type of loop

What will be an ideal response?

Computer Science & Information Technology

Which dynamic trunking mode should be configured if the intention is to have it actively attempt to form a trunk with a connected switch?

A) Dynamic B) Active C) Auto D) Desirable

Computer Science & Information Technology