The GATE Grind

GATE 2018 CS – Question 19

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

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?

  1. QPTRS
  2. PTRSQ
  3. TRPQS
  4. QTPRS

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (A) QPTRS

Explanation

The processor first finishes the current instruction (Q), then saves the process status (P), loads the new PC (T), runs the service routine (R) and finally restores the status (S): QPTRS.