GATE Computer ScienceHardGATE CS (PYQ pattern)

Three interrupt handlers have no overhead: A (priority 1, arrives at 0 µs, runs 10 µs), B (priority 3, arrives at 4 µs, runs 5 µs) and C (priority 2, arrives at 6 µs, runs 4 µs); a larger number is a higher priority. When does C finish (a) with nested, preemptive priority interrupts and (b) when a running handler is never preempted and the highest-priority pending handler runs next?

  1. A. (a) 13 µs, (b) 19 µs
  2. B. (a) 19 µs, (b) 13 µs
  3. C. (a) 13 µs, (b) 14 µs
  4. D. (a) 9 µs, (b) 19 µs

Correct answer: A. (a) 13 µs, (b) 19 µs

(a) A runs 0–4; B preempts and runs 4–9; C (arrived at 6, below B) runs 9–13; A resumes and finishes at 19. (b) A runs to completion at 10; B (higher) runs 10–15, then C 15–19. 14 would be C running right after A.

More Computer Organization and Architecture questions

Exams that ask this topic