edited by
799 views
0 votes
0 votes
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).}$
edited by

2 Answers

0 votes
0 votes

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.

edited by
0 votes
0 votes

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.

Related questions

0 votes
0 votes
1 answer
1
Na462 asked Jul 12, 2018
1,168 views