FCFS · SJF · Round Robin · Priority · Compare
Priority Scheduling Calculator
Non-preemptive CPU scheduling. Among arrived processes, the lowest priority number runs first.
| PID | Arrival | Burst | Priority |
|---|
What is Priority Scheduling?
Priority Scheduling is a CPU scheduling algorithm that selects the process with the highest priority for execution. In this calculator, a lower priority number represents a higher priority.
Is Priority Scheduling Preemptive or Non-Preemptive?
This calculator uses non-preemptive Priority Scheduling. Once a process starts running, it continues until it finishes. The available process with the highest priority is selected next.
Priority Scheduling can also be implemented as a preemptive algorithm, where a newly arrived higher-priority process can interrupt the currently running process.
How Priority Scheduling Works
The scheduler checks the processes that have arrived and selects the process with the highest priority. In non-preemptive Priority Scheduling, a process continues running until its CPU burst is completed.
Priority Scheduling Formulas
Turnaround Time = Completion Time − Arrival Time
Waiting Time = Turnaround Time − Burst Time
Advantages and Disadvantages of Priority Scheduling
| Advantages of Priority Scheduling | Disadvantages of Priority Scheduling |
|---|---|
| Important processes can be executed first. | Low-priority processes may wait for a long time. |
| It can provide better control over process order. | Starvation can occur. |
| Priority can be assigned according to system requirements. | Choosing appropriate priorities can be difficult. |
Priority Scheduling Example
Suppose several processes have different arrival times, burst times, and priority values. When multiple processes are available, the process with the highest priority is selected first.
If lower numbers represent higher priority, a process with priority 1 runs before a process with priority 2.
Related CPU Scheduling Calculators
Try the FCFS Calculator, SJF Calculator, or Round Robin Calculator.