Multiple processes in a multitasking operating system, compete for CPU time. To manage this efficiently, the operating system uses two important components: the Scheduler and the Dispatcher.
Note: Both work together to decide which process will run and how it will be executed by the CPU. Although they are interrelated, they perform distinct functions to ensure optimal CPU utilization and smooth process management.
Dispatcher
Once the Short Term Scheduler selects the next process to execute, the Dispatcher takes over. The Dispatcher is a small, specialized program that gives control of the CPU to the process chosen by the short-term scheduler. It performs the low-level work needed to actually start executing the selected process.

Scheduler
A scheduler is a component of an operating system that manages the execution of processes by deciding which one gets CPU time. It ensures efficient utilization of the CPU and smooth execution of multiple processes.
There are three main types of schedulers, each performing different tasks in process management:
- Long-Term (Job) Scheduler : Moves processes from secondary memory (job pool) to main memory (ready queue).
- Medium-Term Scheduler : Suspends and resumes processes based on system status.
- Short-Term (CPU) Scheduler : Selects one of the ready processes in memory to execute next.

Difference Between Scheduler and Dispatcher
| Scheduler | Dispatcher |
|---|---|
| Decides which process should be executed next. | Transfers control of CPU to the process selected by the scheduler. |
| To select the process and determine execution order. | To start the execution of the selected process. |
| Long-term, Medium-term and Short-term. | No types; it’s a single module. |
| Works independently. | Dependent on the scheduler’s decision. |
| Uses algorithms like FCFS, SJF, RR, Priority, etc. | No specific algorithm used. |
| Less frequent, low decision overhead | Frequent, handles context switching overhead |
| Process selection and queue management. | Context switching, mode change and process start. |
| Works with the ready queue and dispatcher. | Works with CPU and the selected process. |
| Takes longer than the dispatcher. | Executes in a very short time. |