CPU Scheduling Algorithms
CPU Scheduling Algorithms
College of Commerce
Submitted By
Kosar Luqman & Mardin Ahmad
Supervised by
2721 2022
1
Introduction
Today's operating systems are capable of handling several tasks. However, we
know that only one task can run at a time. The CPU then uses a scheduling
algorithm to organize and govern the multiple tasks in the system while also
maximizing CPU utilization. CPU scheduling is the decides which threads,
processes or data flows are given access to system resources (e.g. processor
time, communications bandwidth). This is usually done to load balance a system
effectively or achieve a target quality of service.
1. Preemptive
Prioritized computing is the driving force behind preemptive scheduling.
It needs that the process with the highest priority be the one that is currently using
the processor. If a process is currently using the processor and a new process with
a higher priority enters the ready list, the process on the processor should be
removed and returned to the ready list until it is once again the highest-priority
process in the system.
2. Non-preemptive
Non-preemptive scheduling ensures that once a process has entered the running
state (allowing the resources to run), it cannot be removed from the processor until
the service time has expired.
2
There are mainly six types of process scheduling algorithms:
The SJF (Shortest Job First) algorithm, also known as SPN (Shortest Process
Next), is very similar to the SRT (Shortest Remaining Time) algorithm, with only
the feature of preemption separating them. The process with the shortest expected
processing time is picked next in the non-preemptive SJF algorithm.
This algorithm divides the ready queue into several queues. Processes are assigned
to a queue using this algorithm based on a certain property of the process, such as
3
priority, memory size, and so on. This is not an independent scheduling OS method
because it requires the usage of other sorts of algorithms to schedule the jobs.
5. Priority Scheduling