0% found this document useful (0 votes)
79 views3 pages

CPU Schedulers - Schedulers in OS - Schedulers

There are three types of schedulers in operating systems: long-term, short-term, and medium-term. The long-term scheduler maintains multiprogramming by selecting processes from secondary storage to load into memory. The short-term scheduler increases performance by selecting the next process to execute from the ready queue. The medium-term scheduler performs swapping by moving processes between main memory and secondary storage to free up memory space.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views3 pages

CPU Schedulers - Schedulers in OS - Schedulers

There are three types of schedulers in operating systems: long-term, short-term, and medium-term. The long-term scheduler maintains multiprogramming by selecting processes from secondary storage to load into memory. The short-term scheduler increases performance by selecting the next process to execute from the ready queue. The medium-term scheduler performs swapping by moving processes between main memory and secondary storage to free up memory space.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

CPU Schedulers | Schedulers in OS |

Schedulers
Operating System

Schedulers in OS-
 
 Schedulers in OS are special system software.
 They help in scheduling the processes in various ways.
 They are mainly responsible for selecting the jobs to be submitted into the
system and deciding which process to run.
 

Types of Schedulers-
 
There are 3 kinds of schedulers-
 

 
1. Long-term scheduler
2. Short-term scheduler
3. Medium-term scheduler
 

1. Long-term Scheduler-
 

The primary objective of long-term scheduler is to maintain a good degree of multiprogramming.

 
 Long-term scheduler is also known as Job Scheduler.
 It selects a balanced mix of I/O bound and CPU bound processes from the
secondary memory (new state).
 Then, it loads the selected processes into the main memory (ready state) for
execution.
 

2. Short-term Scheduler-
 

The primary objective of short-term scheduler is to increase the system performance.

 
 Short-term scheduler is also known as CPU Scheduler.
 It decides which process to execute next from the ready queue.
 After short-term scheduler decides the process, Dispatcher assigns the
decided process to the CPU for execution.
 

3. Medium-term Scheduler-
 

The primary objective of medium-term scheduler is to perform swapping.

 
 Medium-term scheduler swaps-out the processes from main memory to
secondary memory to free up the main memory when required.
 Thus, medium-term scheduler reduces the degree of multiprogramming.
 After some time when main memory becomes available, medium-term
scheduler swaps-in the swapped-out process to the main memory and its
execution is resumed from where it left off.
 Swapping may also be required to improve the process mix.
 

Comparison Of Schedulers-
 

Long-term scheduler Medium-term scheduler Short-term scheduler

It is a process swapping
It is a job scheduler It is a CPU scheduler
scheduler.

It controls the degree of It reduces the degree of It provides lesser control over
multiprogramming. multiprogramming. degree of multiprogramming.

Speed is in between the long-


Speed is lesser than short- Speed is fastest among the
term and short-term
term scheduler other two.
schedulers.

It is minimal or almost absent It is a part of time sharing It is also minimal in time


in time sharing system. system. sharing system.

It selects processes from new It swaps-out processes from It selects processes from the
state and loads them into main memory to secondary ready state and assigns to the
ready state. memory and later swaps in. CPU.

Operates more frequently Operates very frequently to


Operates less frequently
than long-term scheduler but match the speed of CPU
since processes are not
less frequently than short- since CPU rapidly switches
rapidly created.
term scheduler. from one process to another

Degree of Multiprogramming-
 
In multiprogramming systems,
 Multiple processes may be present in the ready state which are all ready for
execution.
 Degree of multiprogramming is the maximum number of processes that can
be present in the ready state.
 Long-term scheduler controls the degree of multiprogramming.
 Medium-term scheduler reduces the degree of multiprogramming.
 

Optimal Degree of Multiprogramming-


 
 An optimal degree of multiprogramming means average rate of process
creation is equal to the average departure rate of processes from main memory.
 It is the responsibility of long-term scheduler to maintain a good degree of
multiprogramming.

You might also like