The exponential average formula used to predict the length of the next CPU burst
ID: 3840895 • Letter: T
Question
The exponential average formula used to predict the length of the next CPU burst is given by the recursion equation: tau_n + 1 = alpha tau_n + (1 - alpha)t_n. Where t denotes the nth CPU bust time, and 0 lessthanorequalto alpha lessthanorequalto 1. Explain the roll of alpha in the equation. suppose the first five actual CPU bursts of a process in milliseconds are: t_0 = 6, t_1 = 4, t_2 = 6, t_3 = 8, t_4 = 6. And suppose the initial predicted time is tau_0 = 7. Compute the next predicted time tau_5. What are the implications of assigning the following values to the parameters used by the algorithm? alpha = 0 and tau_0 = 100milliseconds alpha = 1and tau = 10milliseconds iExplanation / Answer
a)
In this formula tn is most recent information. Tn stores past history.The parameter controles the relative weights of recent and past history in out prediction.
b)
let =0.5
T1 = T0 * + ( 1 - ) * t0
T1 = (0.5 x 7) + ( (1 - 0.5) x 6 )
= 3.5 +3.0
= 6.5
T1 = T1 * + ( 1 - ) * t1
T2 = (0.5 x 6.5) + ( (1 - 0.5) x 4 )
= 3.25 +2.0
= 5.25
T3 = T2 * + ( 1 - ) * t2
T3 = (0.5 x 5.25) + ( (1 - 0.5) x 6 )
= 2.625 +3.0
= 5.625
T4 = T3 * + ( 1 - ) * t3
T4 = (0.5 x 5.625) + ( (1 - 0.5) x 8 )
= 2.8125 +4.0
= 6.8125
T5 = T4* + ( 1 - ) * t4
T5 = (0.5 x 6.8125) + ( (1 - 0.5) x 6 )
= 3.40625 +3.0
= 6.40625
c)
1)
if =0
Tn+1 = tn + (-1) Tn
=0*tn + (0-1)Tn
= 0 - Tn
= - Tn (Time always is in postive) so
= Tn
Tn+1 = Tn =
so T0 = T1 = T2 = T3 = T4...............=Tn = 100 milliseconds
2)
if =1
Tn+1 = tn + (-1) Tn
=1 *tn + (1 -1)Tn
= tn - 0 * Tn
= tn
Tn+1 = tn
so T0 = T1 = T2 = T3 = T4...............=Tn = tn = 10 milli seconds
a)
In this formula tn is most recent information. Tn stores past history.The parameter controles the relative weights of recent and past history in out prediction.
b)
let =0.5
T1 = T0 * + ( 1 - ) * t0
T1 = (0.5 x 7) + ( (1 - 0.5) x 6 )
= 3.5 +3.0
= 6.5
T1 = T1 * + ( 1 - ) * t1
T2 = (0.5 x 6.5) + ( (1 - 0.5) x 4 )
= 3.25 +2.0
= 5.25
T3 = T2 * + ( 1 - ) * t2
T3 = (0.5 x 5.25) + ( (1 - 0.5) x 6 )
= 2.625 +3.0
= 5.625
T4 = T3 * + ( 1 - ) * t3
T4 = (0.5 x 5.625) + ( (1 - 0.5) x 8 )
= 2.8125 +4.0
= 6.8125
T5 = T4* + ( 1 - ) * t4
T5 = (0.5 x 6.8125) + ( (1 - 0.5) x 6 )
= 3.40625 +3.0
= 6.40625
c)
1)
if =0
Tn+1 = tn + (-1) Tn
=0*tn + (0-1)Tn
= 0 - Tn
= - Tn (Time always is in postive) so
= Tn
Tn+1 = Tn =
so T0 = T1 = T2 = T3 = T4...............=Tn = 100 milliseconds
2)
if =1
Tn+1 = tn + (-1) Tn
=1 *tn + (1 -1)Tn
= tn - 0 * Tn
= tn
Tn+1 = tn
so T0 = T1 = T2 = T3 = T4...............=Tn = tn = 10 milli seconds
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.