tailieunhanh - Lecture Operating system concepts - 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 I Basic Concepts I Scheduling Criteria I Scheduling Algorithms I Multiple-Processor Scheduling I Real-Time Scheduling I Algorithm Evaluation Operating System Concepts Silberschatz, Galvin and Gagne 2002 Basic Concepts I Maximum CPU utilization obtained with multiprogramming I CPU–I/O Burst Cycle – Process execution consists of a cycle of CPU execution and I/O wait. I CPU burst distribution Operating System Concepts Silberschatz, Galvin and Gagne 2002 Alternating Sequence of CPU And I/O Bursts Operating System Concepts Silberschatz, Galvin and Gagne 2002 Histogram of CPU-burst Times Operating System Concepts Silberschatz, Galvin and Gagne 2002 CPU Scheduler I Selects from among the processes in memory that are ready to execute, and allocates the CPU to one of them. I CPU scheduling decisions may take place when a process: 1. 2. 3. 4. Switches from running to waiting state. Switches from running to ready state. Switches from waiting to ready. Terminates. I Scheduling under 1 and 4 is nonpreemptive. I All other scheduling is preemptive. Operating System Concepts Silberschatz, Galvin and Gagne 2002 Dispatcher I 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 I Dispatch latency – time it takes for the dispatcher to stop one process and start another running. Operating System Concepts Silberschatz, Galvin and Gagne 2002 Scheduling Criteria I CPU utilization – keep the CPU as busy as possible I Throughput – # of processes that complete their execution per time unit I Turnaround time – amount of time to execute a particular process I Waiting time – amount of time a process has been waiting in the ready queue I Response time – amount of time it takes from when a request was submitted until the first

crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.