The process scheduling algorithms used by an operating system

Download Report

Transcript The process scheduling algorithms used by an operating system

Process Scheduling in
Windows XP, Linux, and
UNIX
Common Measures of Operating
System Performance
CPU Utilization
Throughput
Turnaround Time
Response Time
Wait Time
Other Important Factors
“User-Perceived Performance”: This measure is
concerned with how efficient the system seems to
a human user. This deals less with overall
efficiency and more with the time it takes for the
user to see observable results of a response.
Fairness: Processes that are similar are given
similar access to system resources. The property
of fairness is exemplified by the Round Robin
scheduling algorithm.
The process scheduling algorithms used
by an operating system reflect its
primary performance objectives.
Traditional UNIX – Overall Efficiency, Fairness
and User-Perceived Performance
Multi-level feedback queue implementation is used,
so processes with higher priority have first access
to CPU time.
Priority of a process is based on the type of
process, where the swapper has highest priority
and user processes have lowest priority.
The process scheduling algorithms used
by an operating system reflect its
primary performance objectives.
Traditional UNIX – Overall Efficiency, Fairness
and User-Perceived Performance
Round Robin algorithm is implemented within
individual priority queues, and a process’s priority
is decreased as it uses more CPU time.
User programs that are processor-bound are
penalized more than user programs that are I/Obound.
The process scheduling algorithms used
by an operating system reflect its
primary performance objectives.
Modern UNIX – Real-Time Processing and
Overall Efficiency
Processes can be assigned one of three priority
levels: Real Time, Kernel, or Time Shared.
Real Time processes have the highest priority and
may pre-empt processes at any other level,
including kernel processes.
The process scheduling algorithms used
by an operating system reflect its
primary performance objectives.
Modern UNIX – Real-Time Processing and
Overall Efficiency
If multiple real-time processes are waiting to run,
the highest-priority process is selected to run
until it has exhausted its time quantum.
If a higher-level process has not completed but is
not currently in a running status, a process is
selected from the highest-priority ready queue
that is not empty.
The process scheduling algorithms used
by an operating system reflect its
primary performance objectives.
Modern UNIX – Real-Time Processing and
Overall Efficiency
The priorities of time shared processes are
dynamically set by the OS.
A process’s priority is lowered when it uses up a
time quantum and raised it if blocks on an event
or resource.
The process scheduling algorithms used
by an operating system reflect its
primary performance objectives.
Linux—Real-Time Processing and Fairness
Linux uses two process scheduling algorithms: a
real-time algorithm for processes that must be
allowed to execute in a timely fashion, and a
timesharing algorithm for all other processes.
The Round Robin and FIFO scheduling algorithms
are used to switch between real-time processes.
The process scheduling algorithms used
by an operating system reflect its
primary performance objectives.
Linux—Real-Time Processing and Fairness
Timesharing algorithm is prioritized and “creditbased”.
Credit-Based: When a new process must be
selected, the process with the most credits is
selected. A process that is running loses a credit
every time the timer interrupt occurs. When a
process has no more credits, it may not run.
The process scheduling algorithms used
by an operating system reflect its
primary performance objectives.
Linux—Real-Time Processing and Fairness
Timesharing algorithm is prioritized and “creditbased”.
Prioritized: When no processes have any remaining
credits, the system re-assigns credits. Higher
priority processes receive more credits.
The process scheduling algorithms used
by an operating system reflect its
primary performance objectives.
Linux—Real-Time Processing and Fairness
Timesharing algorithm is prioritized and “creditbased”.
This crediting system automatically prioritizes
interactive and I/O-bound processes, which
increases fairness and user-perceived
performance.
The process scheduling algorithms used
by an operating system reflect its
primary performance objectives.
Windows XP – Real Time Processing and UserPerceived Performance
Real time processes have the highest priority and
can pre-empt any process with lower priority.
System processes may be starved by real time
processes because a process’s priority is never
decreased.
The process scheduling algorithms used
by an operating system reflect its
primary performance objectives.
Windows XP – Real Time Processing and UserPerceived Performance
All processes receive a priority boost after a wait
event, but processes that have experienced a
keyboard I/O wait get a larger boost than those
that have experienced a disk I/O wait.
“Foreground” processes given higher priority.
Questions?