0% found this document useful (0 votes)
102 views2 pages

CPU Scheduling in Operating Systems

1. Process scheduling is the activity of the process manager that handles removing running processes from the CPU and selecting new processes based on a scheduling strategy. 2. There are three types of schedulers: long term, short term, and medium term. The long term scheduler brings new processes to the ready state. The short term scheduler selects processes from ready state to run on the CPU. The medium term scheduler suspends and resumes processes and performs swapping between main memory and disk. 3. Scheduling of processes is done to finish work on time and ensure efficient use of CPU resources in multi-programming systems where multiple processes can be loaded in memory and the CPU is shared between them using time multiplexing.

Uploaded by

aadi1988
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)
102 views2 pages

CPU Scheduling in Operating Systems

1. Process scheduling is the activity of the process manager that handles removing running processes from the CPU and selecting new processes based on a scheduling strategy. 2. There are three types of schedulers: long term, short term, and medium term. The long term scheduler brings new processes to the ready state. The short term scheduler selects processes from ready state to run on the CPU. The medium term scheduler suspends and resumes processes and performs swapping between main memory and disk. 3. Scheduling of processes is done to finish work on time and ensure efficient use of CPU resources in multi-programming systems where multiple processes can be loaded in memory and the CPU is shared between them using time multiplexing.

Uploaded by

aadi1988
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/ 2

Scheduling

The process scheduling is the activity of the process manager that handles
the removal of the running process from the CPU and the selection of
another process on the basis of a particular strategy.
Process scheduling is an essential part of a Multiprogramming operating
systems. Such operating systems allow more than one process to be loaded
into the executable memory at a time and the loaded process shares the
CPU using time multiplexing.
There are three types of process scheduler. 
 
1. Long Term or job scheduler : 
It brings the new process to the ‘Ready State’. It controls Degree of
Multi-programming, i.e., number of process present in ready state
at any point of time. It is important that the long-term scheduler
make a careful selection of both IO and CPU bound process. IO
bound tasks are which use much of their time in input and output
operations while CPU bound processes are which spend their time
on CPU. The job scheduler increases efficiency by maintaining a
balance between the two.
 
2. Short term or CPU scheduler : 
It is responsible for selecting one process from ready state for
scheduling it on the running state. Note: Short-term scheduler only
selects the process to schedule it doesn’t load the process on
running.  Here is when all the scheduling algorithms are used. The
CPU scheduler is responsible for ensuring there is no starvation
owing to high burst time processes.
Dispatcher is responsible for loading the process selected by
Short-term scheduler on the CPU (Ready to Running State) Context
switching is done by dispatcher only. A dispatcher does the
following: 
0. Switching context.
1. Switching to user mode.
2. Jumping to the proper location in the newly loaded
program.
3. Medium-term scheduler : 
It is responsible for suspending and resuming the process. It mainly
does swapping (moving processes from main memory to disk and
vice versa). Swapping may be necessary to improve the process
mix or because a change in memory requirements has
overcommitted available memory, requiring memory to be freed up.
It is helpful in maintaining a perfect balance between the I/O bound
and the CPU bound. It reduces the degree of multiprogramming.
Scheduling of processes/work is done to finish the work on time.
Below is different time with respect to a process.

Arrival Time:  Time at which the process arrives in the ready queue.
Completion Time:  Time at which process completes its execution.
Burst Time:  Time required by a process for CPU execution.
Turn Around Time: Time Difference between completion time and arrival
time.
Turn Around Time = Completion Time – Arrival Time
Waiting Time(W.T):  Time Difference between turn around time and burst
time.
Waiting Time = Turn Around Time – Burst Time

Why do we need scheduling?


A typical process involves both I/O time and CPU time. In a uni programming
system like MS-DOS, time spent waiting for I/O is wasted and CPU is free
during this time. In multi programming systems, one process can use CPU
while another is waiting for I/O. This is possible only with process scheduling.

You might also like