572 views
Calculate the Exponential averaging for the $\text{SJF}$ with $T_{1}=10,\alpha = 0.5$ and previous runs as $8,7,4,16$
$\text{(Give the answer correct to one decimal place).}$

11 ??
There is a formula for exponential average on SJF=

$\tau (n+1)=\alpha T(n)+(1-\alpha )\tau (n)$.

Here $\tau (1)$=10 and T(1)=8 and T(2)=5....

find $\tau (5)$
Got the answer as 11. Thanks. :)

A possible interpretation of the problem is that we initially had jobs with actual run times 8, 7, 4, and 16. Assuming no new jobs entered the queue, we'd schedule then in increasing order of their times, namely 4, 7, 8, 16 (since that's what SJF means--shortest job first). Under these assumptions we'd have time slices

T2 = 1/2(4+10) =7  --> After first Job has run

T3 = 1/2(7+7) =7  --> After second Job has run

T4 = 1/2(8+7)=7.5 --> After first Job has run

so the fourth job would be given a slice of 7.5, which is choice (3).

This isn't an entirely satisfactory answer since of course the OS might not know how much time the jobs would actually take before hand, but if the problem assumed they'd be run in that order (4, 7, 8, 16) we'd have what was mentioned as the correct answer, so it's at least apossible interpretation.

A possible interpretation of the problem is that we initially had jobs with actual run times 8, 7, 4, and 16. Assuming no new jobs entered the queue, we'd schedule then in increasing order of their times, namely 4, 7, 8, 16 (since that's what SJF means--shortest job first). Under these assumptions we'd have time slices

T2T3T4=12(4+10)=7=12(7+7)=7=12(8+7)=7.5after the first job has runafter the second job has runafter the third job has runT2=12(4+10)=7after the first job has runT3=12(7+7)=7after the second job has runT4=12(8+7)=7.5after the third job has run

so the fourth job would be given a slice of 7.5, which is choice (3).

This isn't an entirely satisfactory answer since of course the OS might not know how much time the jobs would actually take before hand, but if the problem assumed they'd be run in that order (4, 7, 8, 16) we'd have what was mentioned as the correct answer, so it's at least apossible interpretation.