Non-Preemptive Priority Scheduling is a CPU process Scheduling algorithm in which all the processes are executed by the CPU based on their priority. In this, the scheduling of processes depends upon a third factor called Priority. This PRIORITY is a number provided by the user, which determines when a process will be executed. Process with highest PRIORITY will be executed first and after that the processes with decreasing order of PRIORITY will be executed till the process with the least PRIORITY is executed. If two processes have the same PRIORITY then their order of execution is decided by their burst time, i.e. the process with lower burst time will be executed first. Here, we are talking about Non-Preemptive Priority Scheduling so the process arriving first will be executed first irrespective of its priority and will not be interrupted till it finishes executing even if a process with higher priority arrives during its execution.
Non Preemptive Priority Scheduling In C++