Process Scheduling is responsible for selecting a processor process based on a scheduling method as well as removing a processor process. It’s a crucial component of a multiprogramming operating system. Process scheduling makes use of a variety of scheduling queues. The scheduler’s purpose is to implement the virtual machine so that each process appears to be running on its own computer to the user.
In this article, we will look more into the Process Scheduler in Operating System, according to the GATE Syllabus for (Computer Science Engineering) CSE. Let us read ahead to find out more about it.
Table of Contents
- What is a Process Scheduler in an Operating System?
- Types of Process Schedulers
- Comparison among Schedulers
What is a Process Scheduler in an Operating System?
The process manager’s activity is process scheduling, which involves removing the running process from the CPU and selecting another process based on a specific strategy. The scheduler’s purpose is to implement the virtual machine so that each process appears to be running on its own computer to the user.
Multiprogramming OS’s process scheduling is critical. Multiple processes could be loaded into executable memory at the same time in such an OS, and the loaded processes share the CPU utilising temporal multiplexing.
Types of Process Schedulers
Process schedulers are divided into three categories.
1. Long-Term Scheduler or Job Scheduler
The job scheduler is another name for Long-Term scheduler. It selects processes from the pool (or the secondary memory) and then maintains them in the primary memory’s ready queue.
The Multiprogramming degree is mostly controlled by the Long-Term Scheduler. The goal of the Long-Term scheduler is to select the best mix of IO and CPU bound processes from the pool of jobs.
If the job scheduler selects more IO bound processes, all of the jobs may become stuck, the CPU will be idle for the majority of the time, and multiprogramming will be reduced as a result. Hence, the Long-Term scheduler’s job is crucial and could have a Long-Term impact on the system.
2. Short-Term Scheduler or CPU Scheduler
CPU scheduler is another name for Short-Term scheduler. It chooses one job from the ready queue and then sends it to the CPU for processing.
To determine which work will be dispatched for execution, a scheduling method is utilised. 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 a ready queue for a long period. This is known as hunger, and it can occur if the Short-Term scheduler makes a mistake when selecting the work.
3. Medium-Term Scheduler
The switched-out processes are handled by the Medium-Term scheduler. If the running state processes require some IO time to complete, the state must be changed from running to waiting.
This is accomplished using a Medium-Term scheduler. It stops the process from executing in order to make space for other processes. Swapped out processes are examples of this, and the operation is known as swapping. The Medium-Term scheduler here is in charge of stopping and starting processes.
The degree of multiprogramming is reduced. To have a great blend of operations in the ready queue, swapping is required.
Comparison among Schedulers
Parameters | Long-Term | Short-Term | Medium-Term |
Type of Scheduler | It is a type of job scheduler. | It is a type of CPU scheduler. | It is a type of process swapping scheduler. |
Speed | Its speed is comparatively less than that of the Short-Term scheduler. | It is the fastest among the other two. | Its speed is in between both Long and Short-Term schedulers. |
Purpose | A Long-Term Scheduler helps in controlling the overall degree of multiprogramming. | The Short-Term Scheduler provides much less control over the degree of multiprogramming. | Medium-Term reduces the overall degree of multiprogramming. |
Minimal time-sharing system | Almost absent | Minimal | Present |
Function | Selects processes from the pool and then loads them into the memory for execution. | Selects all those processes that are ready to be executed. | Can re-introduce the given process into memory. The execution can then be continued. |
Keep learning and stay tuned to get the latest updates on GATE Exam along with GATE Eligibility Criteria, GATE 2023, GATE Admit Card, GATE Syllabus, GATE Previous Year Question Paper, and more.
Also Explore,
- Batch Operating System
- Binary Semaphores in Operating System
- Contiguous Memory Allocation in Operating System
- Counting Semaphores in Operating System
- Deadlock Detection and Recovery in Operating System
- Deadlock Prevention in Operating System
- Distributed Operating System
- Dynamic Partitioning in Operating System
- Fixed Partitioning in Operating System
- Functions of Operating System
- Methods for Handling Deadlock in Operating System
- Multiprocessing Operating System
- Multiprogramming Operating System
- Multitasking Operating System
- Network Operating System
- Non-Contiguous Memory Allocation in Operating System
- Operating System Services
- Paging in OS
- Process in Operating System
- Process Scheduling in Operating System
- Process State in Operating System
- Real-Time Operating System
- Resource Allocation Graph in Operating System
- Semaphores in Operating System
- Time-Sharing Operating System
- Types of Operating System
Comments