3.OS Process Scheduling
3.OS Process Scheduling
Process Scheduling
Scheduling
• When a computer is multi-programmed, it
frequently has multiple processes or threads
competing for the CPU at the same time
THROUGHPUT The number of jobs completed in a period of time. (jobs / unit time )
THINK TIME The time spent by the user of an interactive system to figure out the next
request. (seconds)
The goal is to optimize both the average and the amount of variation
6
Scheduling Algorithm Optimization Criteria
P1 P2 P3
0 24 27 30
P2 P3 P1
0 3 6 30
For example :
(a)FIFO (b)SJF
19
Time Quantum and Context Switch Time
Your program should have two functions, one for SJF and another
for RR. Give a choice to user to select.