GATE / CS ARCHIVE

GATE CSE 2025 SET 1 / QUESTION 11

Ordering interrupt service entry

Computer Organization & Architecture · Input/Output, DMA & Interrupts · Full GATE CSE 2025 Set 1 paper

GATE 2025 Set 1, Q11 1 mark · MCQ
Report issue

Input/Output, DMA & Interrupts

Question 11, GATE 2025: A non-pipelined single processor receives an asynchronous device interrupt while running a program. Order these steps: (i) save the program counter, (ii) load the ISR start address into the program counter, (iii) finish the current instruction. A iii,i,ii; B i,iii,ii; C i,ii,iii; D iii,ii,i. Options C and D continue on source page 11.
Question 11, GATE 2025: A non-pipelined single processor receives an asynchronous device interrupt while running a program. Order these steps: (i) save the program counter, (ii) load the ISR start address into the program counter, (iii) finish the current instruction. A iii,i,ii; B i,iii,ii; C i,ii,iii; D iii,ii,i. Options C and D continue on source page 11.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Approach: Preserve a consistent return point before redirecting instruction execution.
First finish the instruction already in progress: step iii. In the usual instruction-boundary interrupt model, this leaves the program’s architectural state consistent and determines the address at which it must resume. Interrupts are asynchronous arrivals, but service is begun at an instruction boundary.
Next save the program counter containing that resume address: step i. Finally load the ISR entry address into the program counter: step ii. Fetching now begins in the interrupt routine, and the saved address remains available for return.
The sequence is iii,i,ii, option A. B and C save before the current instruction has completed; D overwrites the return address with the ISR address before saving it. This ordering describes the stipulated simple processor, not an attempt to interrupt halfway through a partially completed instruction.

Original paper, page 10 · Answer key