Professional Documents
Culture Documents
Process Scheduling Algorithm
Process Scheduling Algorithm
Process Scheduling Algorithm
Or
TT = CT – AT
Gantt chart:-
P0 P1 P2 P3
0 5 8 16 22
Process Arrival Execute Completion Turnaround Time Waiting Time (WT) of
Time Time Time (CT) (TT) Each Process
(AT) (ET)
P0 0 5 5 CT – AT = 5-0 = 5 TT – ET = 5-5= 0
P1 1 3 8 CT – AT = 8-1 = 7 TT – ET = 7-3= 4
P2 2 8 16 CT – AT = 16-2 = 14 TT – ET = 14-8 = 6
P3 3 6 22 CT – AT = 22-3 = 19 TT – ET = 19-6= 13
Gantt chart:-
Based On Non-Preemptive Scheduling
P0 P1 P3 P2
0 5 8 14 22
Processes with same priority are executed on first come first served basis.
Priority can be decided based on memory requirements, time requirements or any other
resource requirement.
Given: Table of processes, and their Arrival time, Execution time, and priority. Here we are
considering Highest number is the highest priority.
P0 P1 P3 P1 P0 P2
0 1 3 9 10 14 22
Quantum = 3
Gant Chart
P0 P1 P2 P3 P0 P2 P3 P2
0 3 6 9 12 14 17 20 22