• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
August 03, 2022 |830 Views
Non-Preemptive Priority CPU Scheduling Algorithm
  Share   Like
Description
Discussion

In this video, we have covered Non-preemptive or the Priority Scheduling Algorithm. 

In this algorithm, the CPU is allocated to the process having the highest priority at the current time. The executing process leaves the CPU on its own, upon termination or when it has to perform I/O operation. Processes having equal priority are executed in the order of their arrival times i.e., in first-come-first-serve manner. It is used in batch systems where processes are scheduled based on their priority and allowed to execute till completion. Important processes are executed first and are not kept waiting. 

Advantages of Non-preemptive or the Priority Scheduling Algorithm:

1) It does not require as many context switches as compared to preemptive priority scheduling algorithm. 
2) Easy to implement when priorities of processes are known beforehand. 

Disadvantages of Non-preemptive or the Priority Scheduling Algorithm:

1) Non-Preemptive Priority Scheduling may suffer from starvation when newer processes with higher priority keep entering the system and lower priority processes keep waiting for their turn on the CPU. 
Ageing is the solution to the starvation problem. After a fixed interval, the priority of a process is decremented which is waiting for a longer period of time. 

Priority CPU Scheduling Algorithm: 
https://www.geeksforgeeks.org/priority-cpu-scheduling-with-different-arrival-time-set-2/

Read More