Consider the following set of processes, with the length of the CPU-burst time given in milliseconds:
| Process |
Burst Time |
Priority |
| P1 |
4 |
3 |
| P2 |
3 |
1 |
| P3 |
8 |
4 |
| P4 |
7 |
2 |
| P5 |
5 |
3 |
The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0.
a) Draw Gantt charts for FCFS and SJF (non-preemptive) scheduling. (5 marks)
b) Calculate the average waiting time for each algorithm. (5 marks)
c) Calculate the average turnaround time for each algorithm. (5 marks)