Suppose there are five processes in the ready queue as shown below:
$$\begin{array}{|c|c|c|} \hline i & T(Pi) & \text{Priority} \\ \hline 0 & 350 & 5 \\ \hline 1 & 125 & 2 \\ \hline 2 & 475 & 3 \\ \hline 3 & 250 & 1 \\ \hline 4 & 75 & 4 \\ \hline\end{array}$$
If FCFS, SJF and priority scheduling algorithms are used, for which algorithm is the average waiting time the minimum? Assume lower integer indicates higher priority and all the processes arrive at time zero.
- FCFS
- Priority scheduling
- SJF
- both FCFS and SJF