Difference between Short term, Medium term and Long term Scheduler

By | September 14, 2021

Long-term scheduler

  • The long term scheduler works with batch queue and selects the next batch job executed. Thus it plans the CPU scheduling for batch jobs. Processes, which are resource intensive and have a low priority are called batch These jobs are executed in a group or bunch. For example, a user request for prate bunch of files.
  • We can also say that a long term scheduler selects the processes or job from secondary storage device e.g. a disk and loads them into the memory for execution. t is also know as job scheduler.

Scheduler and Types of Scheduler

  • The frequency of execution of a long-term scheduler is usually low, as there may be minutes between the creation of new processes in the system.
  • The long term scheduler is called “long-term” because the time for which the scheduling is valid is long.

Medium term schedulers

  • The medium term scheduler is required at the times when a suspended or swapped-out process is to be brought into pool of ready processes
  • A running process may be suspended because of I/O request or by a system call. Such a suspended process is then removed from main memory and is stored in swapped out queue in the secondary memory in order to create a space for some other process in the main memory.
  • This is done because there is a limit on the number of active processes that can reside in main memory.
  • Therefore, a suspended process is swapped-out or rolled out of main memory.

Short-term scheduler

  • The short-term scheduler selects from among the ready processes that are residing in the main memory and allocates CPU to one of them.
  • Thus, it plans the scheduling of the processes that are in ready state.
  • Short term scheduler is also known as CPU scheduler.
  • As compared to long term schedulers, a short term scheduler has to work very often i.e. the frequency of execution of short-term scheduler is high.

Difference between Short term, Medium term and Long term Schedulers

S. No. Short-term Scheduler Medium-term Scheduler Long-term Scheduler
1. It is called CPU scheduler. It is called process swapping scheduler. It is called job scheduler.
2. It provides lesser control of degree over multiprogramming. It reduces the degree of multiprogramming. It controls the degree of multiprogramming
3. Speed of short term scheduler is very fast (Fastest among other two). Speed of medium term scheduler is in-between the short term and long term scheduler. Speed of long term scheduler is lesser than short-term scheduler.
4. It is minimal in time sharing system It is a part of time sharing system. It is almost absent or minimal in time sharing system.
5. It selects the process from among the process that are ready to execute. It can reintroduce the process into memory and its execution can be continued. It selects processes from pool and loads them into memory for execution.

Leave a Reply

Your email address will not be published. Required fields are marked *