GATE CS 2025 Set 1 | Question 11

Computer Organization & Architecture › I/O Interface · MCQ · 1 mark · Answer: A

  1. Question 11Computer Organization & Architecturemcq1 mark
    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?
    • A.
      (iii), (i), (ii)
      ✓
    • B.
      (i), (iii), (ii)
    • C.
      (i), (ii), (iii)
    • D.
      (iii), (ii), (i)

    Answer: A

    Solution

    Answer: (A) (iii), (i), (ii) On an interrupt, the processor: 1. (iii) finishes the current instruction (interrupts are checked at instruction boundaries), 2. (i) saves the PC (return address) so it can resume later, 3. (ii) loads the PC with the ISR start address to begin servicing. Saving the PC must happen before overwriting it with the ISR address, so the order is (iii) → (i) → (ii).

More GATE PYQ on I/O Interface

All GATE CS Computer Organization & Architecture PYQ →

Attempt GATE CS 2025 Set 1 in real GATE exam mode

Full paper with a timer, the GATE interface and a topic-wise analysis — free.

Create free account →