Write clearly numbers in front of each statement to indicate
Write clearly numbers in front of each statement to indicate the correct order of conducting an interrupt?
Note that there may non-applicable statements. In this case, write N/A in the second column. DON’T LEAVE IT BLANK.
Action
Order
The CPU sends the number of the interrupt to the interrupt vector
The CPU sends a signal to the Operating System
The CPU resumes the execution of the user’s program
The CPU checks the status of the device
The CPU suspends the execution of the user’s program
The CPU receives a signal from the device controller
The CPU loads the relevant interrupt handler
The CPU finishes the execution of the current instruction
The CPU acknowledges the receipt of the interrupt signal
The CPU executes the interrupt handler
The CPU saves the state of the currently running program
| Action | Order |
| The CPU sends the number of the interrupt to the interrupt vector | |
| The CPU sends a signal to the Operating System | |
| The CPU resumes the execution of the user’s program | |
| The CPU checks the status of the device | |
| The CPU suspends the execution of the user’s program | |
| The CPU receives a signal from the device controller | |
| The CPU loads the relevant interrupt handler | |
| The CPU finishes the execution of the current instruction | |
| The CPU acknowledges the receipt of the interrupt signal
| |
| The CPU executes the interrupt handler | |
| The CPU saves the state of the currently running program |
|
Solution
Action
Order
The CPU sends the number of the interrupt to the interrupt vector
5
The CPU sends a signal to the Operating System
3
The CPU resumes the execution of the user’s program
11
The CPU checks the status of the device
1
The CPU suspends the execution of the user’s program
8
The CPU receives a signal from the device controller
2
The CPU loads the relevant interrupt handler
4
The CPU finishes the execution of the current instruction
6
The CPU acknowledges the receipt of the interrupt signal
9
The CPU executes the interrupt handler
10
The CPU saves the state of the currently running program
7
| Action | Order |
| The CPU sends the number of the interrupt to the interrupt vector | 5 |
| The CPU sends a signal to the Operating System | 3 |
| The CPU resumes the execution of the user’s program | 11 |
| The CPU checks the status of the device | 1 |
| The CPU suspends the execution of the user’s program | 8 |
| The CPU receives a signal from the device controller | 2 |
| The CPU loads the relevant interrupt handler | 4 |
| The CPU finishes the execution of the current instruction | 6 |
| The CPU acknowledges the receipt of the interrupt signal
| 9 |
| The CPU executes the interrupt handler | 10 |
| The CPU saves the state of the currently running program | 7 |

