In: Computer Science
| i | t(pi) |
| 0 | 80 |
| 1 | 20 |
| 2 | 10 |
| 3 | 20 |
| 4 | 50 |
Using the process load above, suppose a system uses SJN scheduling.
d Create a Gantt chart illustrating the execution of these processes.
e. What is the turnaround time for process p0?
f What is the average wait time for the processes?
Waiting Time = Start Time - Arrival Time
Turn Around Time = Completion Time - Arrival Time
Average Waiting Time = Sum of waiting time of all processes / Number of processes
FCFS Scheduling:

SJN Scheduling:
