- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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 −
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.
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.
- What are a scheduler and a dispatcher in OS?
- Difference Between Long-Term and Short-Term Scheduler in OS
- What is a multithreading model in OS?
- What is a process hierarchy?
- What Is a Labour-Intensive Process?
- What is a process control block?
- Differentiate between process switch and mode switch in OS
- What is Process Suspension and Process Switching?
- What is a process in Operating System?
- What is Process Scheduling?
- What is process termination?
- What is message passing technique in OS?
- What is shared memory in the OS?
- What is dispatcher and difference between dispatcher and scheduler?
- What is Python's OS Module