Download the BYJU'S Exam Prep App for free GATE/ESE preparation videos & tests - Download the BYJU'S Exam Prep App for free GATE/ESE preparation videos & tests -

Process Scheduler in Operating System

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.

GATE Rank Predictor

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?

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.

process-scheduler-in-operating-system

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

process-scheduler-in-operating-system

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

process-scheduler-in-operating-system

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,

Comments

Leave a Comment

Your Mobile number and Email id will not be published.

*

*