CPU Scheduling.pdf - Chapter 6 CPU Scheduling Operating System Concepts \u2013 9th Edition Silberschatz Galvin and Gagne \u00a92013 Chapter 6 CPU Scheduling

CPU Scheduling.pdf - Chapter 6 CPU Scheduling Operating...

This preview shows page 1 - 11 out of 67 pages.

Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 6: CPU Scheduling
Image of page 1
6.2 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Real-Time CPU Scheduling Operating Systems Examples Algorithm Evaluation
Image of page 2
6.3 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Objectives To introduce CPU scheduling, which is the basis for multiprogrammed operating systems To describe various CPU-scheduling algorithms To discuss evaluation criteria for selecting a CPU-scheduling algorithm for a particular system To examine the scheduling algorithms of several operating systems
Image of page 3
6.4 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition 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 followed by I/O burst CPU burst distribution is of main concern
Image of page 4
6.5 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Histogram of CPU-burst Times
Image of page 5
6.6 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition CPU Scheduler Short-term scheduler selects from among the processes in ready queue, and allocates the CPU to one of them Queue may be ordered in various ways 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 Consider access to shared data Consider preemption while in kernel mode Consider interrupts occurring during crucial OS activities
Image of page 6
6.7 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition 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
Image of page 7
6.8 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Scheduling Criteria CPU utilization – keep the CPU as busy as possible Throughput – # of processes that complete their execution per time unit Turnaround time – amount of time to execute a particular process Waiting time – amount of time a process has been waiting in the ready queue Response time – amount of time it takes from when a request was submitted until the first response is produced, not output (for time-sharing environment)
Image of page 8
6.9 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Scheduling Algorithm Optimization Criteria Max CPU utilization Max throughput Min turnaround time Min waiting time Min response time
Image of page 9
6.10
Image of page 10
Image of page 11

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture