Results (
Thai) 2:
[Copy]Copied!
instruction in the program (such as one that requires a program to switch from
running at one level, such as user level, to another level, such as kernel level).
Regardless of which type of interrupt has been invoked, the interrupt handling
process is the same. After the CPU recognizes an interrupt request, the address of
the interrupt service routine is determined (usually by hardware) and the routine
(very much like a procedure) is executed. The CPU switches from running the program
to running a specialized procedure to deal with the interrupt. The normal
fetch-decode-execute cycle is run on the instructions in the interrupt service routine
until that code has been run to completion. The CPU then switches back to the program
it was running before the interrupt occurred. The CPU must return to the exact
point at which it was running in the original program. Therefore, when the CPU
switches to the interrupt service routine, it must save the contents of the PC, the
contents of all other registers in the CPU, and any status conditions that exist for the
original program. When the interrupt service routine is finished, the CPU restores
the exact same environment in which the original program was running, and then
begins fetching, decoding, and executing instructions for the original program.
Being translated, please wait..
