Arrange the following events in correct order when an interrupt occurs during instruction execution. A. Save program counter (PC) and status register. B. Fetch interrupt vector from memory. C. Execute the interrupted instruction completely. D. Transfer control to interrupt service routine (ISR) E. Restore PC and register after ISR Choose the correct answer from the options given below :
When an interrupt occurs during instruction execution, the processor follows a specific sequence to handle it, ensuring the system can resume correctly later. Based on the provided correct order, the events are:
The instruction that was currently being executed when the interrupt signal arrived is first completed. This ensures atomicity for the current operation.
The current state of the processor needs to be saved so that execution can be resumed later from exactly where it left off. This includes:
The processor determines which specific interrupt has occurred. It then fetches an interrupt vector from memory. This vector typically contains the starting address of the Interrupt Service Routine (ISR) designed to handle that particular interrupt.
Once the ISR's address is known, the processor transfers control to it. This means the PC is loaded with the ISR's starting address, and the ISR begins execution.
After the ISR has finished its tasks, the processor restores the previously saved state. This involves reloading the PC and the status register from the saved values. This allows the interrupted program to resume execution seamlessly from the point it was interrupted.
Therefore, the correct order is C, A, B, D, E.
Match List-I with List-II
List I | List II | ||
a. | Micro operation | i. | Specify micro operations |
b. | Micro programmed control unit | ii. | Improve CPU utilization |
c. | Interrupts | iii. | Control Memory |
d. | Micro instruction | iv. | Elementary operation performed on data stored in registers |
Choose the correct option from those given below:
Disabling an interrupt is known as ______.
Which is not true about an interrupt
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?