Open In App

Difference between Long-Term and Medium-Term Scheduler

Long-Term Scheduler:

 Long-term schedulers are called job schedulers. The long-term scheduler controls the programs that are selected within the system for processing. In this, programs are found during a queue and therefore the best job is chosen as per the need it selects the processes from the job pool and these processes are loaded into memory so as to execute. It provides restraint on the degree of multi-programming. 

Advantages of Long-term Scheduler:



Disadvantages of Long-term Scheduler:

Medium-Term Scheduler:

A medium-term scheduler is called a process swapping scheduler as it is a part of swapping. Through this scheduler, processes are removed from memory. Medium-term schedulers cut down the degree of multi-programming. In this scheduler, if a process requests I/O, it can be suspended and it cannot make any progress toward the completion of the suspended process. During this condition, to get rid of the method from memory and make space for other processes, the suspended process is moved to the auxiliary storage. This process is named swapping, and therefore the process is claimed to be swapped out or unrolled. Swapping could also be necessary to enhance the process mix. 



Advantages of Medium-term Scheduler:

Disadvantages of Medium-term Scheduler:

 

Similarities between Long-term and Medium-term Scheduler:

Let’s see the difference between Long-Term and Medium-Term Scheduler:

Long-Term Scheduler Medium-Term Scheduler
Long-term scheduler is called a job scheduler. Whereas the medium-term scheduler is called the process-swapping scheduler.
In a long-term scheduler, the process are selected from the job pool and these processes’ time-sharing are loaded into memory in order to execute. While in this, process can be revived in the memory as well as process execution can also be carried out.
Long-term scheduler is can be or can’t be a part of a time sharing system. if it is then it is nominal in the time-sharing system. While the medium-term scheduler is always in a time-sharing medium-term system.
The speed of long -term scheduler is less than medium-term scheduler. While the speed of medium -term scheduler is comparatively higher than longer-term scheduler.
Long-term scheduler provides the restraint on the DOM(Degree of Multi-programming). While a medium-term scheduler cut down the degree of DOM(Degree of Multi-programming).

Conclusion : 

 the long-term scheduler and medium-term scheduler have different functions, frequencies, scopes, time frames, and roles in system performance. The long-term scheduler determines which processes should be admitted to the system, has a global view of the system, and has a longer time frame. The medium-term scheduler determines which processes should be swapped in and out of memory, has a more local view of the system, and has a shorter time frame. Both schedulers play important roles in ensuring that the system is performing optimally.

Article Tags :