The scheduler is split into three sections. Each section has a specific set of roles to do which are outlined below -

High-level Scheduler (HLS)

This does the initial ordering of the processes. It sets all of the new processes in the ready to run state and uses a scheduling algorithm to place the process in the queue. The HLS main job is to choose the right order for all new processes. Essentially it will decide where in the ready to run queue new processes will be added.

Medium-level Scheduler (MLS)

This handles the movement of processes from primary and secondary memory. It works with virtual memory to decide on which processes should be suspended. See the section on suspended states.

Low-level Scheduler (LLS)

Some processes may have a higher priority than others. For example OS processes tend to have higher priority and real-time processes also have higher priority. The LLS then selects the highest priority process in the queue. If there are more than one process with the same priority then it selects the first in the queue. Remember that the HLS places processes in a specific order into the queue. When a process runs it will enter the running state and remain there until.

  • Its time block is over
  • It has finished
  • It enters the blocking state
  • It is interrupted by the OS