05-SchedulingAlgorithms
05-SchedulingAlgorithms
Scheduling
Algorithms
9th ed: Ch. 6
10th ed: Ch. 5
Objectives
• To understand how to apply several common scheduling algorithms
• FCFS, SJF, SRTF
• Round Robin
• Priority
• Multilevel Queues
• To understand use of measurement and prediction for unknown
scheduling parameters
• E.g., suppose processes with the following burst times arrive in the
order P1, P2, P3 Process Burst Time
P1 24
P2 3
P3 3
• Gives an average per-process waiting time Process Burst Time Waiting Time
of 6 + 0 + 3 = 3 P1 24 6
3 P2 3 0
P3 3 3
• First case is an example of the Convoy Effect
• Short-run processes getting stuck behind long-run processes
• Consider one CPU-bound and many IO-bound processes
05. Scheduling Algorithms 7
Outline
• First-Come First-Served (FCFS)
• Shortest Job First (SJF)
• Shortest Remaining Time First (SRTF)
• Round Robin (RR)
• Priority scheduling
• Multilevel queues
• More fundamentally,
how can we know the length of a future burst?