0% found this document useful (0 votes)
20 views

Cpu Scheduling: Continuous Assessment 1

The document discusses CPU scheduling, which allows processes to use the CPU while others are delayed. It describes the goals of CPU scheduling and the role of the scheduler. The main types of scheduling are preemptive and non-preemptive. Preemptive algorithms discussed are shortest job first and round robin, while non-preemptive algorithms include first come first serve and priority scheduling.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Cpu Scheduling: Continuous Assessment 1

The document discusses CPU scheduling, which allows processes to use the CPU while others are delayed. It describes the goals of CPU scheduling and the role of the scheduler. The main types of scheduling are preemptive and non-preemptive. Preemptive algorithms discussed are shortest job first and round robin, while non-preemptive algorithms include first come first serve and priority scheduling.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

CPU SCHEDULING

Continuous Assessment 1

Subject Name : Operating System


Subject Code : PCC-CS502
Student Name : Surabhi Mondal. ; Roll No. : 32 ; Section : X
1
Stream : Computer science & Engineering
Semester : 5th
University Roll : 17600120029
Subject Teacher : Sumanta Daw.
2 What is CPU Scheduling ?

 CPU Scheduling is a process that allows one process to use the CPU
while another process is delayed (in standby) due to unavailability
of any resources such as I / O etc, thus making full use of the CPU.
 The purpose of CPU Scheduling is to make the system more
efficient, faster, and fairer.
 Whenever a CPU becomes idle, the operating system must select
one of the processes in ready queue to be executed. The selection
process is carried out by the short-term scheduler(or CPU
scheduler).The scheduler selects from among the processes in
memory that are ready to execute, and allocates the CPU to one of
them.
3 What are the different types of CPU Scheduling
Algorithms?

 There are mainly two types of scheduling methods:


• Preemptive Scheduling: Preemptive scheduling is used when a
process switches from running state to ready state or from the
waiting state to the ready state.
• Non-Preemptive Scheduling: Non-Preemptive scheduling is used
when a process terminates , or when a process switches from
running state to waiting state.
4 Scheduling Algorithms

 Preemptive Scheduling :
 Shortest Job First (SJF) Scheduling
 Round Robin (RR) Scheduling

 Non-Preemptive :
 First Come First Serve (FCFS) Scheduling
 Priority Scheduling
5 1. First Come First Serve :

 FCFS considered to be the simplest of all operating system


scheduling algorithms. First come first serve scheduling algorithm
states that the process that requests the CPU first is allocated the
CPU first and is implemented by using FIFO queue.
 Characteristics of FCFS:
• FCFS supports non-preemptive and preemptive CPU scheduling
algorithms.
• Tasks are always executed on a First-come, First-serve concept.
• FCFS is easy to implement and use.
• This algorithm is not much efficient in performance, and the wait
time is quite high.
6 2. Priority Scheduling :
 Priority CPU Scheduling Algorithm is a pre-emptive method of CPU scheduling
algorithm that works based on the priority of a process. In this algorithm, the
editor sets the functions to be as important, meaning that the most important
process must be done first. In the case of any conflict, that is, where there are
more than one processor with equal value, then the most important CPU
planning algorithm works on the basis of the FCFS (First Come First Serve)
algorithm.
 Characteristics of Priority Scheduling:
• Schedules tasks based on priority.
• When the higher priority work arrives while a task with less priority is executed,
the higher priority work takes the place of the less priority one and
• The latter is suspended until the execution is complete.
• Lower is the number assigned, higher is the priority level of a process.
7 3. Shortest Job First :
 Shortest job first (SJF) is a scheduling process that selects the
waiting process with the smallest execution time to execute next.
This scheduling method may or may not be preemptive.
Significantly reduces the average waiting time for other processes
waiting to be executed. The full form of SJF is Shortest Job First.
 Characteristics of SJF:
• Shortest Job first has the advantage of having a minimum average
waiting time among all operating system scheduling algorithms.
• It is associated with each task as a unit of time to complete.
• It may cause starvation if shorter processes keep coming. This
problem can be solved using the concept of ageing.
8 4. Round Robin :

 Round Robin is a CPU scheduling algorithm where each process is


cyclically assigned a fixed time slot. It is the preemptive version
of First come First Serve CPU Scheduling algorithm. Round Robin
CPU Algorithm generally focuses on Time Sharing technique.
 Characteristics of Round robin:
• It’s simple, easy to use, and starvation-free as all processes get the
balanced CPU allocation.
• One of the most widely used methods in CPU scheduling as a core.
• It is considered preemptive as the processes are given to the CPU
for a very limited time.
9

Thank You

You might also like