You are on page 1of 17

process

Scheduling
operating system

Kiran A Patil
R21EJ110
CSIT-B
Today's agenda
What is process scheduling?
Categories of scheduling
What are scheduling queues?
What are schedulers ?
Types of schedulers
what is context switch?
what is process
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.
Categories of Scheduling

PREEMPTIVE NON-PREEMPTIVE

When the operating system When the currently


decides to favour another executing process
process, preempting the gives up the CPU
currently executing process. voluntarily.
What are Scheduling
Queues?

JOB QUEUE READY QUEUE DEVICE QUEUES


All processes, upon Processes in the The processes which
entering into the Ready state are placed are blocked due to
system, are stored in in the Ready Queue. unavailability of an
the Job Queue. I/O device constitute
this queue.
what are Schedulers ?
A

scheduler is a software that helps schedule the


processes in an operating system Their main task is to
select the jobs to be submitted into the system and to
decide which process to run.
05
Types of Schedulers

LONG-TERM SCHEDULER

SHORT-TERM SCHEDULER

MEDIUM-TERM SCHEDULER

Long Term Scheduler


The long-term scheduler is responsible for selecting


new processes to be admitted to the system from a
pool of waiting processes.
It determines the degree of multiprogramming or the
number of processes that can run concurrently in the
system.
The long-term scheduler decides which processes
should be swapped in or out of the main memory.
Short Term Scheduler

The short-term scheduler, also known as the CPU


scheduler, is responsible for selecting a process from
the ready queue and allocating the CPU to it.
It decides which process should run next based on
criteria such as priority, time-slice, and other
scheduling algorithms.
Medium Term Scheduler

The medium-term scheduler manages the memory of a


system by swapping processes in and out of main
memory.
It helps to balance the memory resources and prevent
excessive swapping, which can slow down the system.
When an interrupt occurs, the system needs to save the
current context of the process running on the CPU so that it
What is can restore that context when its processing is done,

Context essentially suspending the process and then resuming it.


The context is represented in the PCB of the process; it

Switch? includes the value of the CPU registers, the process state and
memory-management.

The task of switching a CPU from one process to another
process is called context switching.
Thank you

You might also like