Explanation:-
Priority Scheduling Algorithm is a Non-Primitive algorithm most commonly used in Batch System, In this Type of system each process has Priority and according to Priority Process is executed By CPU and If Two process has same Priority then first come first serve to apply for executing the process. Higher Priority is executed first and so on and Priority of the process can be decided based on Memory requirements, and time requirements or there may be any other resource requirement. In simple word we can say that each and every process has a priority and based on priority process will be executed by CPU or Processor.
1. What is Priority Scheduling Algorithm?.
2. How to Calculate Turn Around Time?.
3. How to Calculate Waiting Time?.
4. Example.
What is Priority Scheduling Algorithm?.
Priority Scheduling Algorithm is a Non-Primitive algorithm and In this Scheduling Algorithm priority is assigned for each and every process in the operating system and based upon some requirements(Memory, Time and Resource) process is executed and Higher Priority is Executed first and if same Priority occurs then first come first serve to apply.
How to Calculate Turn Around Time?.
Turn Around Time = Completion Time – Arrival Time
Total Turn Around Time = Turn Around Time / Total Number of Process
With the help of this formula, we can calculate a Turn Around Time of all process in Queue.
How to Calculate Waiting Time?.
Waiting Time = (Turn Around Time – Burst Time)
Total Waiting Time = Waiting Time / Total Number of Process.
Output: