
Introduction
Process scheduling is one of the most critical activities of the process manager. This activity involves removing the running process from the CPU and selecting another process based on a specific strategy. Process scheduling ensures that the CPU is being used at maximum efficiency to minimize the CPU idle time.
Multiple processes can be loaded into executable memory at the same time in such operating systems, and the loaded processes share the CPU by time multiplexing.
That is why schedulers are used to arrange the processes that ask for resources in order and remove the process whose task is completed. This complete process increases the efficiency and improves the quality of multiprogramming operating systems.
In this article, we will learn about process schedulers in operating systems.
So, let’s get started now:
Recommended Topic, FCFS Scheduling Algorithm, Multiprogramming vs Multitasking
Types of Schedulers
There are three types of process schedulers:
- Long Term Scheduler
- Short Term Scheduler
- Medium Term Scheduler
Let us study each of these schedulers one by one, starting from the long-term scheduler.

Also see, Difference between Dispatcher and Scheduler, Open Source Operating System
Long Term or Job Scheduler
The job scheduler is another name for the long-term scheduler. It selects processes from the pool (secondary memory) and arranges them in the ready queue that is present in the main memory.
Long Term Scheduler is responsible for controlling the degree of Multiprogramming.
The goal of the long-term scheduler is to select the best mix of I/O and CPU-bound processes from the pool of jobs.
This is very crucial that a long-term or job scheduler carefully arrange these CPU-bound and I/O-bound processes.
- If the job scheduler selects more IO-bound processes, all of the jobs may become stuck, and the CPU will be idle for the majority of the time. Due to this, the degree of multiprogramming will be reduced.
-
As a result, if we design processes with a high CPU bound or a perfect balance between I/O and CPU bound, the system's overall performance will improve.
That is why the long-term scheduler's job is crucial and could have a long-term impact on the system.
Short Term or CPU Scheduler
CPU scheduler is another name for the short-term scheduler. It chooses one of the Jobs from the ready queue and sends it to the CPU for processing.
To determine which job from the ready queue will be dispatched for execution, a scheduling algorithm is used. The short-term scheduler's task can be essential in the sense that if it chooses a job with a long CPU burst time, all subsequent jobs will have to wait in the ready queue for an extended period.
This problem is known as starvation, and it occurs if the short-term scheduler makes a mistake when selecting the process.
Note: Short-term scheduler only determines the process that is needed to be scheduled; it doesn't actually load the process on running.
For loading the processes, the dispatcher comes into the picture.
A dispatcher does the following:
- Context-switch.
- Then switching to user mode.
- Jumping to the proper location in the newly loaded program.
Medium Term Scheduler
Medium Term Scheduler is responsible for handling the swapped-out processes. If the running state of the processes requires some IO time to complete, the state must be changed from running to waiting.
To accomplish this task, the medium-term scheduler is used. It stops the process from executing in order to make space for other processes. These processes are called swapped-out processes, and the operation is known as swapping. The medium-term scheduler handles the stopping or suspending, and restarting processes.
You can also read about layered structure of operating system.