5a Processor Scheduling
5a Processor Scheduling
1
2
Turnaround time
From the point of view of a particular process, the important
criteria is how long it takes to execute the process. The interval
from the time of submission of a process to the time of
completion is the turnaround time. Turnaround time is the sum of
the periods spent waiting to get into memory, waiting I the ready
queue, executing on the CPU and doing I/O.
Waiting time
The CPU scheduling algorithm does not affect the amount of time
during which a process executes or does I/O. It affects only the
amount of time that a process spends waiting in the ready queue.
Waiting time is the sum of the periods spent waiting in the ready
queue.
12
Response time
In an interactive system, turnaround time may not be the best
criterion. Often, a process can produce some output fairly early
and can continue computing new results while previous results
are being output to the user.
Thus, another measure is the time from the submission of a
request until the first response is produced. Tis measure, called
response time, is the time it takes to start responding, not the
time it takes to output the response.
13
Ready queue
Processor
P3 P2 P1 Completion
Round Robin (RR) Scheduling
18
Ready queue
P1 P3 P2 P1 Processor Completion
19
Preemption
20