Priority Based Process Scheduling in operating systems

Priority Based Process Scheduling in operating systems.

Priority scheduling is a preemptive algorithm so processes priority matters.

Each process has a priority number.

The process with high priority always gets the CPU on a priority basis.

Processes with the same priority are executed according to the first come first served(FCFS)scheduling algorithm.

Preferred in batch systems.

ProcessBurst TimePriority
P142nd
P223rd
P381st
P434th

Gantt Chart of Preemptive Scheduling

Let us see the Gantt Chart of Preemptive Scheduling.

Preemptive scheduling Diagram

ProcessWaiting Time
P18
P212
P30
P414

Average Wait Time: (0+8+12+14) / 4 = 8.5

Priority Based Process Scheduling Program in C++ (C Plus Plus)

Output

Priority Based Process Scheduling in operating systems

Priority scheduling using friend class and friend function

Let us see the Priority scheduling using friend class and friend function.

Video Lecture

Subscribe for Friendship

Latest posts by Prof. Fazal Rehman Shamil (see all)

Buy advertisement space on T4Tutorials

For more details email [email protected]