FCFS
Process |
Arrival Time |
Burst Time |
Priority |
Waiting Time |
Turn Around Time |
P1 |
0 |
8 |
3 |
0 |
8 |
P2 |
1 |
1 |
1 |
7 |
8 |
P3 |
2 |
3 |
2 |
7 |
10 |
P4 |
3 |
2 |
3 |
9 |
11 |
P5 |
4 |
6 |
4 |
10 |
16 |
Average WT: Total Waiting Time / No of processes: 0+7+7+9+10/5 = 6.6
Average TAT: Total Turn Around Time / No of processes: 8+8+10+11+16/5 = 10.6
Gantt Chart:
Non Pre-emptive SJF:
Process |
Arrival Time |
Burst Time |
Waiting Time |
Turn Around Time |
P1 |
0 |
8 |
0 |
8 |
P2 |
1 |
1 |
7 |
8 |
P3 |
2 |
3 |
9 |
12 |
P4 |
3 |
2 |
6 |
8 |
P5 |
4 |
6 |
10 |
16 |
Average WT: Total Waiting Time / No of processes = 6.4
Average TAT: Total Turn Around Time / No of processes = 10.4
Gantt Chart:
Pre-emptive SJF:
Process |
Arrival Time |
Burst Time |
Waiting Time |
Turn Around Time |
P1 |
0 |
8 |
12 |
20 |
P2 |
1 |
1 |
0 |
1 |
P3 |
2 |
3 |
0 |
3 |
P4 |
3 |
2 |
2 |
4 |
P5 |
4 |
6 |
3 |
9 |
Average WT: Total Waiting Time / No of processes = 3.4
Average TAT: Total Turn Around Time / No of processes = 7.4
Gantt chart:
Pre-emptive Priority:
Process |
Arrival Time |
Burst Time |
Waiting Time |
Turn Around Time |
P1 |
0 |
8 |
3 |
12 |
P2 |
1 |
1 |
1 |
1 |
P3 |
2 |
3 |
2 |
3 |
P4 |
3 |
2 |
3 |
11 |
P5 |
4 |
6 |
4 |
16 |
Average WT: Total Waiting Time/No of processes = 4.6
Average TAT: Total Turn Around Time/No of processes = 8.6
Gantt Chart :