-
A scheduling algorithm assigns priority proportional to the waiting time of a process. Every process starts with priority zero (the lowest priority). The scheduler reevaluates the process priorities every T time units and decides the next process to schedule. Which one of the following is TRUE if the processes have no I/O operations and all arrive at time zero?
-
- This algorithm is equivalent to the first-comefirst-serve algorithm
- This algorithm is equivalent to the round-robin algorithm
- This algorithm is equivalent to the shortest-job-first algorithm
- This algorithm is equivalent to the shortestremaining-time-first algorithm
- This algorithm is equivalent to the first-comefirst-serve algorithm
Correct Option: B
Process scheduling is independent of the time it takes for a process to execute. Thus, shortest-jobfirst algorithm and shortest remaining-time-first algorithm can be discarded (i.e., option c and d) Initially as all the processes arrive simultaneously the waiting time for each process = 0
Any of the processes can be scheduled first say P1. Since, the scheduler re-evaluates the process priorities every T time units. After T units of time, Waiting time of P1 = 0 and waiting time of all the others = T.
Thus, in priority all other processes supersede P1 and hence other processes get scheduled thereafter. Once, every process gets scheduled one time each for T time units all the processes will have same waiting time i.e., (n – 1)T, where n is the process number.
On the basis of analysis this is Round Robin with preemptions at periods of T.
Option (a) is incorrect because scheduling is independent of the arrival time of the processor.