Professional Documents
Culture Documents
21CS56 - Operating Systems Chapter 5 - (Module2) Process Scheduling
21CS56 - Operating Systems Chapter 5 - (Module2) Process Scheduling
21CS56 - Operating Systems Chapter 5 - (Module2) Process Scheduling
❑If two processes have the same length CPU burst, FCFS scheduling is used
to break the tie.
❑For long-term scheduling in a batch system, we can use the process time
● Commonly, α set to ½
● Preemptive version called shortest-remaining-time-first
WT..P1=0+9=9,P2=1-1=0,P3=17-2=15,P4=5-3=2.
Avg. WT= (9+0+15+2)/4=6.5
TAT= P1=17, P2=4, P3=24, P4=7 Avg TAT= (17+4+24+7)/4=13
Department of Information Science and Engg 23
Transform Here
Priority Scheduling
❑A priority is associated with each process.
❑ The CPU is allocated to the process with the highest priority.
❑ Equal-priority processes are scheduled in FCFS order.
❑Priority scheduling can be either preemptive or non-preemptive.
❑1.Preemptive
The CPU is preempted if the priority of the newly arrived process is
higher than the priority of the currently running process.
2. Non Preemptive
The new process is put at the head of the ready-queue