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