Skip to content
GATEiit

GATE CSE 2018 Q19: Order of events when an interrupt is serviced

Syllabus topics: I/O interface: interrupt and DMA; System calls, processes and threads

Question

The following are some events that occur after a device controller issues an interrupt while process L is under execution.

(P) The processor pushes the process status of L onto the control stack.

(Q) The processor finishes the execution of the current instruction.

(R) The processor executes the interrupt service routine.

(S) The processor pops the process status of L from the control stack.

(T) The processor loads the new PC value based on the interrupt.

Which one of the following is the correct order in which the events above occur?

Try it: multiple choice: exactly one correct option

Select one option
Wrong answer costs 1/3 mark in GATE.
Show answer and explanation

Answer: A (official GATE 2018 final answer key)

Concept used: Interrupt handling: complete the current instruction, save the state, jump to the handler via the new PC, run the ISR, then restore the state.

Concept notes

Loading notes…

First step: Decide what must happen before the old state can be saved, and what must be saved before the PC is overwritten.

Full step-by-step solution

Loading…

Answer from the official final answer key. Found a mistake? Use Report issue and we will fix it.

More questions on I/O interface: interrupt and DMA

Every PYQ on this topic →

Share this question

WhatsAppDownload image

Source: official GATE 2018 CS question paper and final answer key, organised by IIT Guwahati. Question paper · Answer key