Chapter_5

Chapter_5 - Chapter 5 CPU Scheduling s Overview q q q q q q q Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
5.1 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 5: CPU Scheduling Chapter 5: CPU Scheduling Overview: Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation Operating Systems Examples
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Basic Concepts Basic Concepts To Maximize CPU utilization, multiprogramming is used CPU–I/O Burst Cycle – Process execution consists of an alternating sequence of CPU executions and I/O waits CPU burst distribution
Background image of page 2
5.3 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Alternating Sequence of CPU And I/O Bursts Alternating Sequence of CPU And I/O Bursts of a Process of a Process
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5.4 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Histogram of CPU-burst Times Histogram of CPU-burst Times
Background image of page 4
5.5 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts CPU Scheduler 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 non-preemptive All other scheduling is preemptive
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5.6 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Dispatcher 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
Background image of page 6
5.7 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Scheduling Criteria 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 taken 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)
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5.8 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Optimization Criteria Optimization Criteria A CPU scheduling algorithm should strive for Maximizing CPU utilization Maximizing throughput Minimizing turnaround time Minimizing waiting time Minimizing response time Making the users happy
Background image of page 8
Silberschatz, Galvin and Gagne ©2005 Operating System Concepts First-Come, First-Served (FCFS) Scheduling First-Come, First-Served (FCFS) Scheduling Process Burst Time P 1 24 P 2 3 P 3 3 Suppose that the processes arrive in the order: P 1 , P 2 , P 3 The Gantt Chart for the schedule is:
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 12/14/2010.

Page1 / 41

Chapter_5 - Chapter 5 CPU Scheduling s Overview q q q q q q q Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online