Friday, March 06, 2020

Types of Schedulers in OS | Long term, Medium term and Short term scheduler in Operating System



Scheduling Algorithm

To understand this topic in a better way I must recommend you go through once from our last lecture which was about Process Scheduling in Operating System so you may better understand the concept.
The processes wait into the different queues to get the process i.e. Job Queue, Ready Queue and Wait Queue.
This is the responsibility of algorithm to get to check which process should be assigned to processor.
You might be thinking there is nothing like responsibility here just let the process use the process number wise that is why they are already in the queue.

NO! NO! A BIG NO!

Suppose there is a queue of vehicles in the traffic jam and you have authority or say a kind of power by which you can make any vehicle to go first or last. Why wouldn’t you allow an ambulance to go first from that jam by using your powers or say authority.
The same case happens in the process queue some process come with emergency or say they want to get processor on priority basis (There are different cases for which a process wants to get processor on priority basis.)

This is the job of the scheduler algorithm to check which process should get the processor on priority basis that is why the scheduling algorithms are important.

We know we have three different queues Job Queue, Ready Queue and Wait Queue so we have three kind of scheduling algorithms as well.
·         Long Term Scheduler
·         Short Term Scheduler
·         Medium Term Scheduler

Long Term Scheduler:  This is responsible for managing the process in the job queue which is in the secondary memory.

Short Term Scheduler:  This is responsible for managing the process in the ready queue which is in the main memory.
softwareengineering,mysoftwarenotes.com,mysoftwarenotes,long term scheduler,short term scheduler,long term scheduler vs short term scheduler,medium term scheduler,types of scheduling algorithms,operating system,os,operating system tutorial,operating system hindi,long term scheduler in hindi,long term scheduler in os in hindi,long term scheduler diagram,cpu scheduler,explain long term scheduler,cpu os

Medium Term Scheduler:  This is not responsible for managing the process in the waiting queue as your thinking.
Why it is not responsible for waiting queue? Process have different states through which it passes in the whole life one out of theme is waiting state when the process is waiting for the I/O operation. After getting the I/O operating it get backs into the ready state that means eventually it will be managed by the short-term scheduler.

Medium Term scheduler is responsible to keep things in the smooth flow. Smooth by keeping they ways of other process clear.
But who block the ways?
Some time a process resides into the main memory and do nothing other than reserving resources short term scheduler swipe it out of the main memory and make space for other process. In some cases a low priority process use more memory in the main memory so to make space for priority basis process this algorithm swipe out that low priority process.

Softwareengineering,Operating System,mysoftwarenotes,mysoftwarenotes.com,process scheduling in operating system,process scheduling,process scheduling algorithms in operating system,process scheduling queues in operating system,process scheduling queues,process scheduling queues in operating system in hindi,ready queue,waiting queue theory,ready queue in operating system,ready queue and various i/o device queues,short term scheduler in operating system,os in hindi


No comments:

Post a Comment