
- Operating System Tutorial
- OS - Home
- OS - Overview
- OS - Components
- OS - Types
- OS - Services
- OS - Properties
- OS - Processes
- OS - Process Scheduling
- OS - Scheduling algorithms
- OS - Multi-threading
- OS - Memory Management
- OS - Virtual Memory
- OS - I/O Hardware
- OS - I/O Software
- OS - File System
- OS - Security
- OS - Linux
- OS - Exams Questions with Answers
- OS - Exams Questions with Answers
- Operating System Useful Resources
- OS - Quick Guide
- OS - Useful Resources
- OS - Discussion
What are a scheduler and a dispatcher in OS?
Let us begin by understanding what a scheduler is.
Scheduler
It is used for handling the process and makes scheduling for the process. The main task of the scheduler is to select the process and make order of process, and to decide which process runs first.
Types of Schedulers
There are three different types of schedulers, which are as follows −
Long term scheduler
Long term scheduling is performed when a new process is created, if the number of ready processes in the ready queue becomes very high, and then there is an overhead on the operating system, for maintaining long lists, containing switching and dispatching increases. Therefore, allowing only a limited number of processes into the ready queue, the long term scheduler manages this.
The long term scheduler is given below −
Medium term scheduler
After execution then enters into input/ output operation state, then again comes back into a ready state. So, at that time a medium-term scheduler is used.
The medium-term scheduler is given below −
Short term scheduler
All the processes are in a ready state, which process should run first, it has to be decided by the short-term scheduler.
The short term scheduler is given below −
Dispatcher
The dispatcher is done after the scheduler. It gives control of the CPU to the process selected by the short-term scheduler. After selecting the process, the dispatcher gives CPU to it.
Functions
The functions of the dispatcher are as follows −
Switching context.
Switching to user mode.
The dispatcher is given below −
Differences
The major differences between scheduler and dispatcher are as follows −
All the processes are in a ready state with no schedule.
At that time the scheduler used some algorithm.
Scheduling all the processes in the ready queue.
After completing scheduling, the dispatcher enters.
The dispatcher moves the selected process from the ready queue into the running state.
The same process continues simultaneously.
Scheduler scheduling the process, at the same time dispatcher dispatches selected processes to the running state.
- Related Articles
- What is dispatcher and difference between dispatcher and scheduler?
- What is a process scheduler in OS?
- Difference Between Long-Term and Short-Term Scheduler in OS
- What are the differences between Client OS and Server OS?
- What are layered structures and its benefits in OS?
- What is a multithreading model in OS?
- What are the advantages and disadvantages of Different OS?
- What are the shells available in LINUX OS?
- What are hardware and software resources managed by the OS?
- What are advantages and disadvantages of object based distributed OS?
- What are the components and functions of the UNIX OS?
- Enabling Web dispatcher in SAP HANA Studio
- Scheduler activations
- What languages have been used to write Windows, Mac OS and Linux OS?
- Difference between Network OS and Distributed OS
