ch5 Part1
ch5 Part1
Operating System Concepts – 10th Edition Silberschatz, Galvin and Gagne ©2018
Outline
§ Basic Concepts
§ Scheduling Criteria
§ Scheduling Algorithms
§ Thread Scheduling
§ Multi-Processor Scheduling
§ Real-Time CPU Scheduling
§ Operating Systems Examples
§ Algorithm Evaluation
Operating System Concepts – 10th Edition 5.3 Silberschatz, Galvin and Gagne ©2018
Objectives
Operating System Concepts – 10th Edition 5.4 Silberschatz, Galvin and Gagne ©2018
Basic Concepts
Operating System Concepts – 10th Edition 5.5 Silberschatz, Galvin and Gagne ©2018
Histogram of CPU-burst Times
Operating System Concepts – 10th Edition 5.6 Silberschatz, Galvin and Gagne ©2018
CPU Scheduler
§ The CPU scheduler selects from among the processes in ready
queue, and allocates a CPU core 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
§ For situations 1 and 4, there is no choice in terms of scheduling. A
new process (if one exists in the ready queue) must be selected
for execution.
§ For situations 2 and 3, however, there is a choice.
Operating System Concepts – 10th Edition 5.7 Silberschatz, Galvin and Gagne ©2018
Preemptive and Nonpreemptive Scheduling
Operating System Concepts – 10th Edition 5.8 Silberschatz, Galvin and Gagne ©2018
Preemptive Scheduling and Race Conditions
Operating System Concepts – 10th Edition 5.9 Silberschatz, Galvin and Gagne ©2018
Dispatcher
§ Dispatcher module gives control of the
CPU to the process selected by the CPU
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 – 10th Edition 5.10 Silberschatz, Galvin and Gagne ©2018
Scheduling Criteria
Operating System Concepts – 10th Edition 5.11 Silberschatz, Galvin and Gagne ©2018
Scheduling Algorithm Optimization Criteria
Operating System Concepts – 10th Edition 5.12 Silberschatz, Galvin and Gagne ©2018
NEXT :
SCHEDULING ALGORITHMS
Operating System Concepts – 10th Edition 5.13 Silberschatz, Galvin and Gagne ©2018