Discussion
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?
Answer: A
The correct order is QPTRS.
- (Q) The processor finishes the instruction it is executing; interrupts are checked between instructions.
- (P) It saves the status of process L on the control stack, so L can be resumed.
- (T) It loads the PC with the address of the interrupt service routine.
- (R) It runs the interrupt service routine.
- (S) It restores L's status from the stack and L continues.
PTRSQ saves the status before the current instruction completes, TRPQS jumps to the handler without first saving L's state, and QTPRS loads the new PC before saving the old state, which would lose L's return address.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development