in Operating System
1,280 views
1 vote
1 vote
The aging algorithm with $a = 1/2$ is being used to predict run times. The previous four runs, from oldest to most recent, are $40, 20, 40,$ and $15$ msec. What is the prediction of the next time?
in Operating System
1.3k views

1 Answer

0 votes
0 votes
Answer: 

On taking all the $4$ previous run times, the prediction

$\begin {align} =& (((40 + 20) / 2 + 40) /2 +15) / 2 \\ =& ((30 + 40 / 2 + 15 ) /2  \\=& (35 + 15)/2 \\=& 25 \end {align}$

On taking only $2$ previous executions, the prediction$ = \frac{40 + 15}{2} = 27.5$

edited by
by

1 comment


Sir, to get the answer we also need the predicted times for the last four runs as well or at least the predicted time of the oldest run, Because the formula in ageing is this: T(n) = a*t(n-1) + (1-a)T(n-1)

What do u say?

0
0

Related questions