edited by
544 views
2 votes
2 votes

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.

  1. FCFS
  2. Priority scheduling
  3. SJF
  4. both FCFS and SJF
edited by

1 Answer

Best answer
2 votes
2 votes
For FCFS Average waiting time = (0+350+475+950+1200)/5 = 595
for SJF Average waiting time = (0+75+200+450+800)/5 = 305
for  priority scheduling algorithm  Average waiting time = (0+250+375+850+925)/5 = 480.
selected by
Answer:

Related questions

1 votes
1 votes
2 answers
2