Process Schedulers in Operating System (original) (raw)

Last Updated : 11 May, 2026

Process scheduling is the activity of the process manager that handles the removal of the running process from the CPU and the selection of another process based on a particular strategy. Throughout its lifetime, a process moves between various scheduling queues, such as the ready queue, waiting queue or devices queue.

seven_state

Process scheduler

Process Schedulers

Process Schedulers are fundamental components of operating systems responsible for deciding the order in which processes are executed by the CPU. In simpler terms, they manage how the CPU allocates its time among multiple tasks or processes that are competing for its attention.

**1. Long-Term Scheduler (Job Scheduler)

The Long-Term Scheduler is responsible for loading processes from disk into main memory so they can begin execution.

**2. Short-Term Scheduler (CPU Scheduler)

The Short-Term Scheduler (STS) is responsible for selecting a process from the ready queue and assigning the CPU to it.

scheduling_queues

Short-Term Scheduler

**2.1 Dispatcher

The Dispatcher is a special program that takes over once the short-term scheduler selects a process. It transfers control of the CPU to the chosen process. The following are functions of it.

**Dispatcher Example : Using FCFS scheduling for processes **P1 -> P2 -> P3 -> P4:

**Note

dispatcher

Dispatcher

**3. Medium-Term Scheduler

The Medium-Term Scheduler (MTS) manages swapping, which temporarily moves processes between main memory and disk.

mts

Medium-Term Scheduler

**Some Other Schedulers

Apart from CPU scheduling, operating systems also use specialized schedulers to manage I/O operations and real-time tasks efficiently.

**I/O Schedulers

**Real-Time Schedulers

Comparison Among Scheduler

Feature Long-Term Scheduler Short-Term Scheduler Medium-Term Scheduler
Type Job scheduler CPU scheduler Process-swapping scheduler
Speed Slowest Fastest Medium (between both)
Multiprogramming Control Controls degree of multiprogramming Less control over multiprogramming Reduces degree of multiprogramming
Presence in Time-Sharing Systems Rarely used or absent Essential Present as a component
Main Function Selects processes from job pool and loads into memory Selects ready processes for CPU execution Reintroduces swapped processes into memory