CPU Scheduling Algorithms

To decide which process has to execute first and which process has to execute later, is done through CPU scheduling algorithms. OS also use CPU Scheduler to schedules different processes.

Types of CPU Scheduling 

1. Non-preemptive scheduling

Every new process has to wait until the running process finishes its CPU cycle or complete its execution.

2. Preemptive scheduling

It allows a running process to be interrupted by a high priority process. 

Note: But he condition In both cases (preemptive and non-preemptive) is, if any interrupt is occur during the process execution. Then CPU leave the current running process and shift to that interrupt.

Some scheduling algorithms in Non-preemptive are

  1. First Come First Serve (FCFS)
  2. Shortest Job First (SJF)
  3. Highest Priority (0 is the highest priority)
  4. Highest response ratio Next (HRRN)

Some scheduling algorithms in preemptive are

  1. Shortest remaining time first
  2. Round Robin
  3. Priority Based
  4. Multilevel Queue
  5. Multi-level feedback

The Purpose of CPU Scheduling algorithm

  1. Maximum utilization of CPU
  2. Maximum throughput
  3. Minimum waiting time
  4. Highly responsive

We will explain both types, preemptive and non-preemptive, with examples in next lectures.

Help Other’s By Sharing…

Contact Us

Burewala, Vehari, Punjab, Pakistan

cstaleem1@gmail.com

Website: CStaleem.com

Pin It on Pinterest