139k views
2 votes
What is the difficulty with SJF in short term scheduling?

User Uladz Kha
by
7.7k points

1 Answer

6 votes

Final answer:

The difficulty with SJF in short term scheduling is the lack of knowledge about real-time execution time, possible starvation of longer processes, and potential system bottlenecks.

Step-by-step explanation:

The difficulty with SJF in short term scheduling

Shortest Job First (SJF) is a scheduling algorithm used in operating systems to prioritize processes based on their execution time. Although SJF can optimize the average waiting time, it suffers from one major difficulty in short term scheduling:

1. Lack of knowledge about real-time execution time: SJF requires accurate knowledge of the execution time of each process to make optimal scheduling decisions. However, determining the exact execution time of a process is challenging due to external factors like input/output operations, which can vary and make predictions unreliable.

2. Starvation of longer processes: SJF prioritizes shorter processes, which can lead to longer processes being delayed or starved. If there are a few longer processes in the system, they may have to wait indefinitely, causing inefficiency and unfairness in the scheduling.

3. High system responsiveness: SJF's focus on shorter processes might result in a more responsive system as they get executed quickly. However, this may lead to larger, more resource-intensive processes being postponed, leading to potential system bottlenecks and decreased overall system performance.

User J Wynia
by
8.0k points