Question 148: If shortest job first policy is used without pre-emption, what would be the average waiting time?
Options:
- 2
- 3
- 4
- 5
Solution: The correct answer is the third one. Average waiting time is (0 + 6 + 3 + 7)/4 = 4
Question #59: If there are 4 processes in the system namely P1, P2, P3, P4 with the CPU burst time of 1ms, 2ms, 3ms, and 4ms respectively. They arrive at the same time in order of P3, P2, P4, P1. Which of the following scheduling policy will yield the least average waiting time?
Options:
Solution:
SJF yields the least waiting time when all of the processes arrive at the same time. For SJF, waiting time is (0 + 1 + 3 + 6) / 4 = 2.5ms. For FCFS, it is (9 + 3 + 0 + 5 ) / 4 = 4.25ms. Hence, the correct answer is option 1.