Professional Documents
Culture Documents
a.
FCFS
P1
0
SJF
P2 P4 P3
0 1 2
P2 P3
10 11
P5
4
P4 P5
13 14
19
P1
9
19
P3
16
P4
18 19
RR (quantum=1)
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
b.
Turnaround time for each process:
FCFS
SJF
P1
10
19
P2
11
1
P3
13
4
P4
14
2
P5
19
9
Priority
16
1
18
19
6
RR
19
2
7
4
14
c.
Waiting time for each process:
FCFS
P1
0
P2
10
P3
11
P4
13
P5
14
Sum
48
Average
9.6
Priority
6
0
16
18
1
41
8.2
RR
9
1
5
3
9
27
5.4
SJF
9
0
2
1
4
16
3.2
d.
SJF results in the minimum average waiting time (3.2).