The interrupt procedure is executed whenever a processor has to enter the KERNEL mode to execute the MCP Kernel code. Since KERNEL mode is restricted to one processor only at any given time, the processor mode transitions are strictly controlled by a KERNEL MODE ACCESS LOCK. A processor requesting the KERNEL MODE ACCESS LOCK may be in either STOPPED, IDLE or EXECUTING mode.
The Interrupt Procedure is composed of three phases which are:
The operations performed during the State Saving phase depend on the mode the processor is leaving.
To each phase is associated a time which is accounted differently. The way the State Saving phase time is charged depends upon the mode the processor is leaving:
The User Task time is recorded via the Time Slice Remaining field in the reinstate list entry for that task. The Interrupting time and Kernel time are recorded and saved on a processor basis within the processor itself.
The Interrupting phase is the one during which the processor that is leaving its current mode (EXECUTING, IDLE or STOPPED), tries to obtain access to KERNEL mode by vying for the KERNEL MODE ACCESS LOCK. The following operations are performed during this phase:
The Kernel Entry phase is used to set up the initial state for the processor to begin executing instructions in the MCP's kernel.