Page 88 - DCAP103_Principle of operating system
P. 88
Unit 3: Process Management-II
Can only estimate the length. Notes
Can be done by using the length of previous CPU bursts, using
exponential averaging.
Prediction of the Length of the Next CPU Burst
Pn+1 = a tn +(1-a)Pn
This formula defines an exponential average
Pn stores the past history
tn contents are most recent information
the parameter “a “controls the relative weight of recent and past history
of in our prediction
If a =0 then Pn +1 =Pn
That is prediction is constant
If a = 1 then Pn +1 = tn
Prediction is last cpu burst
4 RR with Time Quantum = 4
Process Burst Time
P1 24
P2 3
P3 3
The Gantt chart is:
P1 P2 P3 P1 P1 P1 P1 P1
0 4 7 10 14 18 22 26 30
Average waiting time = [(30-24)+4+7]/3 = 17/3 = 5.66
5 Multilevel Feedback Queue
Quantum=8
Quantum=16
FCFS
LOVELY PROFESSIONAL UNIVERSITY 81