GATE 2018 CS – Question 19
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?
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.