Priority&Round Robin Algorithm
Priority&Round Robin Algorithm
Example1:Consider the following set of processes with their Burst time and
arrival time,
• Draw the Gantt charts for the (Priority) algorithm.
• Calculate the waiting time for each process and AWT?
• Calculate the turn-around time for each algorithm
process and ATAT?
• Calculate the Throughput?
process Burst Time Priority
P1 10 3
P2 1 1
P3 2 4
P4 1 5
P5 5 2
Priority scheduling chart
Throughput=n/length_cycle
Throughput =3/(24+3+3)=0.1
5-Round Robin (RR)
Example2:Consider the following set of processes with their Burst time and
arrival time, and Time Quantum = 3
• Draw the Gantt charts for the (RR) algorithm.
• Calculate the waiting time for each process and AWT?
• Calculate the turn-around time for each process and ATAT?
• Calculate the Throughput?
Throughput=n/length_cycle
Throughput =4/(10+4+5+3)=0.18
Types of CPU scheduling algorithms
nonpreemptive preemptive
FCFS RR
SJF SRTF
Priority Priority