Which of the following is FALSE about SJF (Shortest Job First Scheduli...
- Both SJF and Shortest Remaining time first algorithms may cause starvation. Consider a situation when long process is there in ready queue and shorter processes keep coming.
- SJF is optimal in terms of average waiting time for a given set of processes, but problems with SJF is how to know/predict time of next job.
View all questions of this test
Which of the following is FALSE about SJF (Shortest Job First Scheduli...
Shortest Job First Scheduling (SJF)
Shortest Job First Scheduling is a non-preemptive scheduling algorithm in which the process with the smallest burst time is executed first. It aims to minimize the average waiting time and provides better throughput.
False Statements about SJF
S1: It causes minimum average waiting time
This statement is true. SJF scheduling algorithm ensures that the process with the smallest burst time is executed first. By executing shorter jobs first, the average waiting time can be minimized. This is because shorter jobs complete faster, allowing subsequent processes to start sooner, reducing the waiting time for other processes.
S2: It can cause starvation
This statement is false. SJF scheduling algorithm does not cause starvation. Starvation occurs when a process is unable to proceed because it is not being allocated the required resources. In the case of SJF, every process eventually gets executed, even though shorter jobs are prioritized. This is because once a process with a shorter burst time arrives, it will be executed first, but the longer jobs will still get their turn.
Conclusion
In conclusion, the false statement about SJF scheduling is that it can cause starvation. SJF scheduling does not cause starvation as every process eventually gets executed, even though shorter jobs are prioritized. However, it is important to note that SJF scheduling may not always be the most optimal algorithm in practical scenarios as it requires knowledge of the burst times of all processes in advance, which may not always be available.