Prerequisite – Process Schedulers
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 out during a queue and therefore the best one job is chosen as per the need and it selects the processes from the job pool and these process are loaded into memory so as to execute. It provides the restraint on the degree of multi-programming.
Medium-term scheduler called as process swapping scheduler as it is a part of swapping. Through this scheduler, processes are removed from memory. Medium-term scheduler cut down the degree of degree of multi-programming. In this scheduler, if a process requests I/O, it can be suspended and it cannot make any progress towards 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.
Let’s see the difference between Long-Term and Medium-Term Scheduler:
|S.NO||Long-Term Scheduler||Medium-Term Scheduler|
|1.||Long-term scheduler is called as job scheduler.||Whereas medium-term scheduler is called as process swapping scheduler.||2.||In long-term scheduler, the process are selected from the job pool and these process 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.|
|3.||Long-term scheduler is can be or can’t be a part of a time sharing system. if it is then it is a nominal in time sharing system.||While medium-term scheduler is always in a time sharing system.|
|4.||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.|
|5.||Long-term scheduler provides the restraint on the DOM(Degree of Multi-programming).||While medium-term scheduler cut down the degree of DOM(Degree of Multi-programming).|