What is a process scheduler in OS?

Process scheduler is a part of the Operating system which schedules the process. If the process is in ready, waiting and running state it schedules it correctly and is also responsible for the allocation of the CPU processor to a specific task within a time interval.

Also, when the task or process is completed it doesn't allow the CPU to sit idle. It will allocate the other task depending on its current state. If the process was in ready state it will allocate it to the CPU in this way it always keeps the CPU busy all of the time.

Characteristics of good process scheduler

The characteristics of a good process scheduler are as follows −

  • It increases the utilization of the CPU as it keeps it busy all the time by assigning the ready state processes.

  • It has flexibility you can change your schedules easily

  • It allows revisiting or reviewing your projects.

  • By using this you can strictly follow the deadlines. For example − If you have a deadline for a project for SEP 10th then you can set the deadline for 10th SEP till 6pm or anything.

  • Also the tasks are not isolated; you can clearly see the relation among them or how they are interconnected to each other.

Categories of Scheduling

Scheduling has two general categories. These are as follows −

Pre-emptive Scheduling

It means the CPU runs an undertaking with a higher need before another lower need task, regardless of whether the lower need task is as yet running. Around then, the lower need task holds for quite a while and resumes when the higher need task completes its execution.

Non Pre-emptive Scheduling

In this sort of planning technique, the CPU has been allotted to a particular cycle. The cycle that keeps the CPU occupied will deliver the CPU either by exchanging settings or ending.

It is the main strategy that can be utilized for different equipment stages. That is on the grounds that it doesn't require specific equipment (for instance, a clock) like pre-emptive Scheduling.

Non Pre-emptive Scheduling happens when a cycle fully enters the standby state or ends.

Key differences

The major differences between pre-emptive and non pre-emptive scheduling are as follows −

  • The Processor is assigned to the processes in pre-emptive Scheduling for a fixed time frame, and the non pre-emptive scheduling Processor is assigned to the process before it finishes.

  • Tasks are switched based on priority in pre-emptive scheduling, although no switching takes place in non pre-emptive scheduling.

  • The Pre-emptive Algorithm has the overhead of moving the process from the ready state to the operating state, although there is no such overhead for Non pre-emptive Scheduling.

  • Although non pre-emptive scheduling is static, pre-emptive scheduling is flexible.

Updated on: 30-Nov-2021

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started