CS FundamentalsVery hardGATE CS

A process is in the middle of a system call when a hardware interrupt arrives. Which statement about mode and stacks is correct on a typical Unix-like OS?

  1. A. The CPU is already in kernel mode; the interrupt handler runs in kernel mode (on a kernel stack) and then the system call resumes
  2. B. The CPU switches to user mode to run the interrupt handler
  3. C. The interrupt is discarded until the system call returns
  4. D. The system call is aborted and restarted from user mode

Correct answer: A. The CPU is already in kernel mode; the interrupt handler runs in kernel mode (on a kernel stack) and then the system call resumes

Interrupts can nest on top of kernel execution; the handler runs in kernel mode using kernel stack space, after which the interrupted kernel path (the system call) continues. Interrupts are not dropped; they may be briefly masked.

More Operating Systems questions

Exams that ask this topic