OS & Hardware
In a system requiring real-time behavior, which factor most increases interrupt latency, the time from an interrupt occurring until its handler starts?
- AKeeping the processing inside interrupt handlers as short as possible
- BAllowing higher-priority interrupts to preempt lower-priority ones
- CHaving sections in the kernel that run long operations with interrupts disabled
Show answer and explanation
Answer: C. Having sections in the kernel that run long operations with interrupts disabled
While interrupts are disabled, no interrupt can be accepted, however urgent, so worst-case latency is set by the longest interrupt-disabled section. Real-time systems keep such sections short and perform lengthy work with interrupts enabled. Short handlers and allowing high-priority interrupts to preempt low-priority ones (nested interrupts) reduce latency rather than increase it.
- A. Short handlers are a way to reduce latency.
- B. Priority preemption reduces latency for urgent interrupts.
- C. Correct. Long interrupt-disabled sections set the worst-case latency.