Solution
Scheduling Algorithm: Non-preemptive Shortest Job First (SJF)
Gantt chart:
0 5 7 8 11 14
Process Table:
|
Process
|
Arrival Time (AT)
|
Burst Time (BT)
|
Completion Time (CT)
|
Turn Around Time (TAT)
|
Waiting Time (WT)
|
|
P₁
|
0
|
5
|
5
|
5
|
0
|
|
P₃
|
2
|
2
|
7
|
5
|
3
|
|
P₅
|
6
|
1
|
8
|
2
|
1
|
|
P₂
|
2
|
3
|
11
|
9
|
6
|
|
P₄
|
5
|
3
|
14
|
9
|
6
|
Average waiting time = \(\frac{{0 + 3 + 1 + 6 + 6}}{5} = 3.2\)
Important Points:
WT = TAT - BT