tailieunhanh - Lecture Operating system concepts (Sixth ed) - Chapter 6: CPU scheduling

In chapter 4, we introduced threads to the process model. On operating systems that support them, it is kernel-level threads not processes that are in fact being scheduled by the operating system. However, the terms "process scheduling" and "thread scheduling" are often used interchangeably. In this chapter, we use process scheduling when discussing general scheduling concepts and thread scheduling to refer to thread-specific ideas. | Chapter 6 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation Operating System Concepts Silberschatz Galvin and Gagne 2002 Basic Concepts Maximum CPU utilization obtained with multiprogramming CPU-I O Burst Cycle - Process execution consists of a cycle of CPU execution and I O wait. CPU burst distribution Operating System Concepts Silberschatz Galvin and Gagne 2002 Histogram of CPU-burst Times Operating System Concepts Silberschatz Galvin and Gagne 2002 CPU Scheduler Selects from among the processes in memory that are ready to execute and allocates the CPU to one of them. CPU scheduling decisions may take place when a process 1. Switches from running to waiting state. 2. Switches from running to ready state. 3. Switches from waiting to ready. 4. Terminates. Scheduling under 1 and 4 is nonpreemptive. All other scheduling is preemptive. Operating System Concepts Silberschatz Galvin and Gagne 2002 Dispatcher Dispatcher module gives control of the CPU to the process selected by the short-term scheduler this involves switching context switching to user mode jumping to the proper location in the user program to restart that program Dispatch latency - time it takes for the dispatcher to stop one process and start another running. Operating System Concepts Silberschatz Galvin and Gagne 2002