What are the Long term scheduler and Short term scheduler?

Long term scheduler :

  • Long term scheduler is also called a Job scheduler
  • The long term scheduler, or job scheduler, selects processes from the job pool and loads them into memory for execution or CPU scheduling.
  • The long term scheduler executes much less frequently.
  • It is slower than short term scheduler.
  • The long term scheduler controls the degree of multiprogramming. If the degree of multiprogramming is stable, then the average rate of process creation must be equal to the average departure rate of processes leaving the system.
  • The long-term scheduler may need to be invoked only when a process leaves the system. Because of the longer interval between executions, the long-term scheduler can afford to take more time to decide which process should be selected for execution.
  • On some systems, the long-term scheduler may be absent or minimal, like time-sharing systems, such as UNIX and Microsoft Windows systems often have no long-term scheduler but simply put every new process in memory for the short-term scheduler. The stability of these systems depends either on a physical limitation (such as the number of available terminals) or on the self-adjusting nature of human users.

Short term scheduler :

  • It is a CPU scheduler
  • The short-term scheduler, selects from among the processes that are ready to execute and allocates the CPU to one of them.
  • The short-term scheduler executes more frequently.
  • Because of the short time between executions, the short-term scheduler must be fast.

Medium term scheduler :

  • Some operating systems, such as time-sharing systems, may introduce an additional, intermediate level of scheduling.
  • The key idea behind a medium-term scheduler is that, sometimes, it can be advantageous to remove a process from memory (and from active contention for the CPU) and thus, reduce the degree of multiprogramming.
  • The process is swapped out, and is later swapped in, by the medium-term scheduler.

Leave a Reply

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