889 views
1 votes
1 votes
Assume that a process has CPU burst time for last four runs as 3 sec, 4 sec, 5 sec and 3 sec (last). Given that last predict burst time was 4 sec and α = 0.6. The next predict of CPU burst time for process when CPU scheduler is shortest process next with exponential averaging is _________. in sec (upto 1 to decimal places).

1 Answer

2 votes
2 votes
$\tau_{n+1} = \alpha t_n + (1 - \alpha) \tau_n$

where $\tau_{n+1}$ is the predicted value of the next CPU burst.

$0 \leq \alpha \leq 1$

$\tau_n$ is the predicted value of the last CPU burst (here $\tau_n$ = 4s), and

$t_n$ is the (actual) last run time of the process (here $t_n$ is 3s).

Putting these all,

$\tau_5$ = 0.6 * 3 + 0.4 * 4 = 1.8 + 1.6 = 3.4s

Related questions

0 votes
0 votes
1 answer
1
0 votes
0 votes
3 answers
2