The GATE Grind

GATE 2025 CS (CS1) – Question 11

Computer Organization and Architecture · I/O Interface: Interrupt and DMA · 1 mark · Multiple choice

Suppose a program is running on a non-pipelined single processor computer system. The computer is connected to an external device that can interrupt the processor asynchronously. The processor needs to execute the interrupt service routine (ISR) to serve this interrupt. The following steps (not necessarily in order) are taken by the processor when the interrupt arrives:
(i) The processor saves the content of the program counter.
(ii) The program counter is loaded with the start address of the ISR.
(iii) The processor finishes the present instruction.

Which ONE of the following is the CORRECT sequence of steps?

  1. (iii), (i), (ii)
  2. (i), (iii), (ii)
  3. (i), (ii), (iii)
  4. (iii), (ii), (i)

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (A) (iii), (i), (ii)

Explanation

The current instruction completes first, then the PC is saved so execution can resume, and finally the PC is loaded with the ISR address.