An interrupt is a signal sent to the processor that interrupts the current process and execute the interrupt. The interrupt may be generated by a hardware device or a software program.
The hardware interrupt is mostly create by an input device such as a keyboard, or mouse. For example, if you are using an MS program and press a key, the program must process the input immediately. Typing “YES” creates three interrupt requests, which allows the program to display the letters you typed. In the same way, when you click a mouse button, you send an interrupt signal to the device.
Each interrupt request (IRQ) has a unique setting and its priority. As Keyboard and mouse having higher interrupt.
Software interrupts are use to handle errors and exceptions of running programs. For example, if a program expects a variable to be a valid number, but the value is null then an interrupt may be generated to handle the program from crashing.
Both hardware and software interrupts are processed by an interrupt handler which is also called an interrupt service routine (ISR).
The following are some events that occur after a device control issues on interrupt while processor L is under execution.
- P) Processor pushes the process status of L onto 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) Processor Loads the new PC value based on interrupt.
Which of the following is the correct order in which the above events occur?
The answer is option is (C) which is QPTRS