November 23, 2024

Schedulers, Types of Schedulers, Long, Short, and Medium Term Schedulers

Schedulers are special system software that handles process scheduling in various ways. Their main task is to select the jobs to be submitted into the system and to decide which process to run. Schedulers are of three types

  • Long Term Scheduler
  • Short Term Scheduler
  • Medium Term Scheduler

Long Term Scheduler

  • It is also called a job scheduler.
  • The long-term scheduler determines which programs are admitted to the system for processing.
  • The job scheduler selects processes from the queue and loads them into memory for execution.
  • Process loads into the memory for the CPU scheduler.
  • The primary objective of the job scheduler is to provide a balanced mix of jobs, such as I/O bound and processor bound.
  • It also 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.
  • When the process changes the state from new to ready, then there is a long-term schedular exists.

Short Term Scheduler

  • It is also called a CPU scheduler.
  • the Main objective is to increase system performance in accordance with the chosen set of criteria.
  • It is the change of the ready state to the running state of the process. CPU  scheduler selects from among the processes that are ready to execute and allocates the CPU to one of them.
  • A short-term scheduler also known as a dispatcher executes most frequently and makes the fine-grained decision of which process to execute next. The short-term scheduler is faster than a long-term scheduler.

Medium Term Scheduler

  • Medium-term scheduling is part of the swapping function.
  • It removes the processes from the memory.
  • It reduces the degree of multiprogramming.
  • The medium-term scheduler is in charge of handling the swapped-out processes.
  • The running process may become suspended by making an I/O request.  Suspended processes cannot make any progress toward completion. In this condition, it removes the process from memory and makes space for other processes. The suspended process is moved to the secondary storage is called swapping, and the process is said to be swapped out or rolled out.  Swapping may be necessary to improve the process mix.

3 thoughts on “Schedulers, Types of Schedulers, Long, Short, and Medium Term Schedulers

Leave a Reply

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