1/9/ :46 1 Priority Model Real-time class Idle Above Normal Normal Below Normal Lowest Highest 31 Time-critical Dynamic classes 15 Time-critical High class 1 Idle Normal class Idle class Thread Level
1/9/ :46 2 Thread Priority = Process class + level Real-time class Idle Above Normal Normal Below Normal Lowest Highest 31 Time-critical Dynamic classes 15 Time-critical High class 1 Idle Normal class Idle class Thread Level
1/9/ :46 3 Scheduling Threads scheduled by executive. Priority based preemptive scheduling. Interrupts Deferred Procedure Calls (DPC) System and user-level threads
1/9/ :46 4 Servicing an interrupt Power Failure APC Normal Exec. Dispatch/DPC Device X Interrupt Dispatch Table 1 Device interrupts Interrupt Service Routine DPC Routine Device Driver DPC DPC FIFO Queue DPC DPC FIFO Queue user-level threads Interrupts DPC
1/9/ :46 5 Servicing an interrupt Power Failure APC Normal Exec. Dispatch/DPC Device X Interrupt Dispatch Table 1 Device interrupts 2 Transfer control to ISR Interrupt Service Routine DPC Routine Device Driver DPC DPC FIFO Queue DPC DPC FIFO Queue user-level threads Interrupts DPC
1/9/ :46 6 Servicing an interrupt Power Failure APC Normal Exec. Dispatch/DPC Device X Interrupt Dispatch Table 1 Device interrupts 2 Transfer control to ISR Interrupt Service Routine DPC Routine Device Driver DPC DPC FIFO Queue DPC DPC FIFO Queue user-level threads Interrupts DPC
1/9/ :46 7 Servicing an interrupt Power Failure APC Normal Exec. Dispatch/DPC Device X Interrupt Dispatch Table 1 Device interrupts 2 Transfer control to ISR Interrupt Service Routine DPC Routine Device Driver DPC DPC FIFO Queue DPC DPC FIFO Queue user-level threads Interrupts DPC 3 Stop int.. and queue DPC
1/9/ :46 8 Servicing an interrupt Power Failure APC Normal Exec. Dispatch/DPC Device X Interrupt Dispatch Table 1 Device interrupts 2 Transfer control to ISR Interrupt Service Routine DPC Routine Device Driver DPC DPC FIFO Queue DPC DPC FIFO Queue user-level threads Interrupts DPC 3 Stop int.. and queue DPC
1/9/ :46 9 Servicing an interrupt Power Failure APC Normal Exec. Dispatch/DPC Device X Interrupt Dispatch Table 1 Device interrupts 2 Transfer control to ISR Interrupt Service Routine DPC Routine Device Driver 3 Stop int.. and queue DPC DPC DPC FIFO Queue DPC DPC FIFO Queue 4 Task level drops and DPC can execute user-level threads Interrupts DPC
1/9/ :46 10 Servicing an interrupt Power Failure APC Normal Exec. Dispatch/DPC Device X Interrupt Dispatch Table 1 Device interrupts 2 Transfer control to ISR Interrupt Service Routine DPC Routine Device Driver 3 Stop int.. and queue DPC DPC DPC FIFO Queue DPC DPC FIFO Queue 4 Task level drops and DPC can execute 5 Transfer control to driver’s DPC user-level threads Interrupts DPC
1/9/ :46 11 Servicing an interrupt Power Failure APC Normal Exec. Dispatch/DPC Device X Interrupt Dispatch Table 1 Device interrupts 2 Transfer control to ISR Interrupt Service Routine DPC Routine Device Driver 3 Stop int.. and queue DPC DPC DPC FIFO Queue DPC DPC FIFO Queue 4 Task level drops and DPC can execute 5 Transfer control to driver’s DPC 6 Execution of DPC routine user-level threads Interrupts DPC
1/9/ :46 12 I/O Handling I/O request is sent to device driver. Device completes operation and interrupts. Complete I/O request. Buffered I/ODirect I/O APC Device System User’s space Device System User’s space (Keyboard, mouse) (disk, network)