GATE Computer ScienceVery hardGATE CS (PYQ pattern)

An interrupt is recognised only at instruction boundaries. The longest instruction takes 30 cycles; on average an interrupt arrives half-way through an instruction of average length 6 cycles. Saving state and vectoring takes 20 cycles. What are the worst-case and average interrupt-to-first-handler-instruction latencies (average = half of the average instruction length + overhead)?

  1. A. 20 cycles worst, 23 cycles average
  2. B. 30 cycles worst, 3 cycles average
  3. C. 50 cycles worst, 23 cycles average
  4. D. 50 cycles worst, 26 cycles average

Correct answer: C. 50 cycles worst, 23 cycles average

Worst case: wait out the longest instruction (30) + 20 = 50. Average: 6/2 + 20 = 23.

More Computer Organization and Architecture questions

Exams that ask this topic