Priority Based Scheduling
- Each process is assigned a priority. Process with highest priority is to be executed first and so on.
- Processes with same priority are executed on first come first serve basis.
- Priority can be decided based on memory requirements, time requirements or any other resource requirement.
|Process||Arrival Time||Execute Time||Priority||Service Time|
Wait time of each process is following
|Process||Wait Time : Service Time - Arrival Time|
|P0||0 - 0 = 0|
|P1||3 - 1 = 2|
|P2||8 - 2 = 6|
|P3||16 - 3 = 13|
Average Wait Time: (0+2+6+13) / 4 = 5.25