Differentiate between the long-term, short-term, and medium-term schedulers.

Before working on the difference between all three schedulers, let us recall the concept of process scheduler.

Process scheduler is a part of the Operating system which schedules processes. If the process is in ready, waiting and running state, it schedules it correctly and is also responsible for the allocation of the CPU processor to a specific task within a time interval.

Also, when the task or process is completed it doesn't allow the CPU to sit idle. It will allocate the other task depending on its current state. If the process was in ready state it will allocate it to the CPU, in this way it always keeps the CPU busy all of the time.

Types of Schedulers

There are three types of schedulers in an operating system −

OS Scheduler Hierarchy Long-Term Scheduler Medium-Term Scheduler Short-Term Scheduler Job Queue ? Memory Memory ? Disk Swap Ready Queue ? CPU Job Scheduler Swapping Scheduler CPU Scheduler Seconds/Minutes Seconds Milliseconds

  • Long-Term Scheduler (Job Scheduler) − Selects processes from the job pool and loads them into memory.

  • Medium-Term Scheduler (Swapping Scheduler) − Manages swapping of processes between main memory and disk.

  • Short-Term Scheduler (CPU Scheduler) − Selects processes from ready queue for CPU execution.

Long-Term Scheduler

The long-term scheduler decides which processes are admitted to the system for processing. It controls the degree of multiprogramming by determining how many processes can be in memory simultaneously.

Medium-Term Scheduler

The medium-term scheduler handles swapping of processes between main memory and secondary storage. It temporarily removes processes from memory to reduce the degree of multiprogramming and later reintroduces them.

Short-Term Scheduler

The short-term scheduler selects which process from the ready queue should be executed next by the CPU. It is invoked very frequently and must be fast to minimize scheduling overhead.

Comparison

The major differences between long-term, medium-term and short-term scheduler are as follows −

Long-Term Scheduler Medium-Term Scheduler Short-Term Scheduler
Also called Job Scheduler Also called Swapping Scheduler Also called CPU Scheduler
Speed is slowest among all three Speed is moderate between long and short-term Speed is fastest among all three
Controls the degree of multiprogramming Reduces the degree of multiprogramming Provides lesser control over degree of multiprogramming
Absent or minimal in time-sharing systems Part of time-sharing systems Essential component of time-sharing systems
Selects processes from job pool and loads into memory Swaps processes between memory and disk storage Selects ready processes for CPU execution
Execution frequency: Minutes or Hours Execution frequency: Seconds Execution frequency: Milliseconds

Key Points

  • Execution Frequency − Short-term scheduler runs most frequently, medium-term moderately, and long-term least frequently.

  • Primary Function − Each scheduler operates at different levels of the process management hierarchy.

  • Performance Impact − Short-term scheduler directly affects system responsiveness, while long-term affects overall throughput.

  • Memory Management − Long-term controls admission, medium-term manages swapping, short-term handles CPU allocation.

Conclusion

The three schedulers work together to optimize system performance − long-term controls process admission, medium-term manages memory through swapping, and short-term ensures efficient CPU utilization. Understanding their distinct roles is crucial for effective process management in operating systems.

Updated on: 2026-03-17T09:01:38+05:30

30K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements