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?

  1. AKeeping the processing inside interrupt handlers as short as possible
  2. BAllowing higher-priority interrupts to preempt lower-priority ones
  3. 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.
Practice this topic Back to topic

More OS & Hardware questions

  1. Which describes an NMI (non-maskable interrupt)?
  2. On a multicore system, when the OS modifies a page-table entry to revoke a mapping, what must be done?
  3. What generally happens when a program accesses an address the OS has not allocated?
  4. In a mechanism that maps a file into memory (such as mmap), what happens when the file's contents are read?
  5. When writing small data one byte at a time, why is accumulating it in a user-space buffer and writing in bulk faster than calling a system call each time?