OS & Hardware
Why is interrupt handling split into a short part done immediately and the remainder done later in a normal context?
- ARunning the handler in two parts halves the total amount of work
- BThe second half is done automatically by hardware, so no software is needed
- CTo minimize time with interrupts held off and defer heavy work
Show answer and explanation
Answer: C. To minimize time with interrupts held off and defer heavy work
While a handler runs, interrupts of the same or lower priority are often held off, so long handlers degrade the whole system's responsiveness. Only urgent work, such as reading device status and acknowledging the interrupt, is done first; slow work, such as processing data and notifying upper layers, is deferred to a normal context with interrupts enabled. The total work does not shrink, and software still does the second part.
- A. The total work does not shrink.
- B. Software still performs the second part.
- C. Correct. It minimizes time with interrupts held off and defers heavy work.