Professional Documents
Culture Documents
2020
SHAHBAZ 28 May 2020
KHAN
F18-0312
BS(SE) 4th A
The processes are assumed to have arrived in the order p1, p2, p3, p4, p5
all at time 0.
a. Draw four Gantt Charts illustrating the execution of these
processes using FCFS, SJF, a non preemptive priority (a smaller
number implies higher priority, and RR (Quantum=1)
scheduling.
b. What is the turnaround time of each process for each of the
scheduling algorithms in part a?
c. What is the waiting time of each process for each of these
scheduling algorithms?
d. Which of the algorithms results in the minimum average waiting
time (over all processes)?
P1 P2 P3 P4 P5
0 10 11 13 14 19
P2 P5 P1 P3 P4
0 1 6 16 18 19
Turnaround Time
P1 16
P2 1
P3 18
P4 19
P5 6
Waiting Time
P1 6
P2 0
P3 16
P4 18
P5 1
P2 P4 P3 P5 P1
1 2 4 9 19
Turnaround Time
P1 19
P2 1
P3 4
P4 2
P5 9
Waiting Time
P1 9
P2 0
P3 2
P4 1
P5 4
p1 p2 p3 p4 p5 P1 P3 P5 P1 P5 P1 P5 P1 P5 P1 P1 P1 P1 P1
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Turnaround Time
P1 19
P2 2
P3 7
P4 4
P5 14
Waiting Time
P1 9
P2 1
P3 5
P4 3
P5 9