Chapter 9 Uniprocessor Scheduling
Chapter 9 Uniprocessor Scheduling
Systems:
Internals
and Chapter 9
Design Uniprocessor
Principles
Scheduling
Seventh Edition
By William Stallings
Dave Bremer
Otago Polytechnic, N.Z.
Operating Systems:
Internals and Design Principles
— Yogi Berra
Processor Scheduling
Aim is to assign processes to be executed by the processor
in a way that meets system (performance) objectives, such
as response time, throughput, and processor efficiency
Broken down into three separate functions:
medium
long term short term
term
scheduling scheduling
scheduling
Table 9.1
Types of Scheduling
Scheduling and Process State Transitions
Figure 9.2
Nesting of
Scheduling Functions
easily hard to
quantitative qualitative
measured measure
Table 9.2
Scheduling
Criteria
Priority
Queuing
Selection Function
Determines which process, among ready processes, is selected next for execution
Nonpreemptive Preemptive
once a process is in the running currently running process may
state, it will continue until it be interrupted and moved to
terminates, blocks itself for ready state by the OS
I/O, or give up voluntarily preemption may occur when
new process arrives, on an
interrupt, or periodically
Table 9.4
Process Scheduling
Example
Table 9.5
Comparison of
Scheduling
Policies
“Favor” I/O-bound
processes to provide
fairness and higher
I/O device utilization
Shortest Process Next
(SPN)
Nonpreemptive policy in which the One difficulty is the need to know,
process with the shortest expected or at least estimate, the required
processing time is selected next processing time of each process
A short process will jump to the If the programmer’s estimate is
head of the queue substantially under the actual
running time, the system may
Possibility of starvation for longer
abort the job
processes
Shortest Remaining Time
(SRT)
Preemptive version of SPN Should give superior turnaround
time performance to SPN because
Scheduler always chooses the a short job is given immediate
process that has the shortest preference to a running longer
expected remaining processing job
time
From a user’s point of view, response time is generally the most important
characteristic of a system; from a system point of view, throughput or processor
utilization is important
Algorithms: