GATE CS 2025 Set 1 — Question 11
Go beyond PYQs with Success TrackerAI-powered personalised practice and doubt support. Unlimited practice on eligible plans; AI usage limits apply.MCQ+1 / -0.33EasyInterrupt-Driven I/OI/O OrganizationComputer Organization & ArchitectureInterrupts & TrapsOS Structure & System CallsOperating System
Computer Organization & Architecture → I/O Organization → Interrupt-Driven I/O
Last updated
Question
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?
(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?
Correct answer
(A) (iii), (i), (ii)
Solution
When an interrupt occurs, the processor follows these steps to ensure a smooth transition to the interrupt handler and back:
1.Finish the present instruction (iii): To maintain a consistent state, the processor completes the execution of the current instruction before responding to the interrupt.
2.Save the state (i): The processor saves the current program counter (PC) and other essential registers to the stack so that it can resume the original program from the correct point after the ISR finishes.
3.Load ISR address (ii): The processor loads the starting address of the Interrupt Service Routine (ISR) into the program counter to begin executing the interrupt handler.
Therefore, the correct sequence is (iii) (i) (ii).Continue learning with Success Tracker
A step still unclear? Work through it with support
Use Success Tracker to ask about the reasoning, then try another GATE CS question to check your understanding.
AI-powered practice· Unlimited practice on eligible plans
- PYQs with solutions
- Attempt available previous-year questions, then compare your reasoning with the worked solution. Coverage varies by stream.
- Practice that adapts
- Choose a topic, work on weaker areas and bookmark questions to revisit. Your attempts feed your progress tracking.
- AI doubt support
- Ask follow-up questions about a step or concept while practising, instead of stopping at the final answer.
Unlimited practice is available on eligible plans. Free practice and AI usage have limits; check the current plan allowances before choosing.
This page stays readable without an account. AI responses can be wrong; check them against the solution and source material.
More questions on I/O Organization
2026 Set 1 Q14Match each addressing mode in List I with a data element or an element of a data structure (in…2026 Set 1 Q15Consider a processor P whose instruction set architecture is the load-store architecture. The…2026 Set 1 Q16Which one of the following dependencies among the register operands of different instructions can…2026 Set 2 Q18Consider the following two statements about interrupt handling mechanisms in a CPU. S1: In…2026 Set 2 Q23Which one of the following CPU scheduling algorithms cannot be preemptive?