edited by
1,863 views
1 1 vote
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).}$

2 Answers

0 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 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.

Position:
Show:

Related questions

0 0 votes
1 1 answer
161
161 views
naveendewangan asked Aug 14
161 views
SJF suffers from convoy effect ? It states "SJF will not preempt a current long job that arrives before shorter jobs." So please clarify this whether SJF suffers from con...
0 0 votes
2 2 answers
1.7k
1.7k views
Na462 asked Jul 12, 2018
1,714 views
1 1 vote
0 0 answers
5.7k
5.7k views
iarnav asked Jul 11, 2018
5,689 views
Let's say we have two CPU scheduling algorithm as SJF and SRTF and we have a arbitrary pool/set of processes with different ARRIVAL TIME and CPU BURST, then what CPU sch...
0 0 votes
1 answers 1 answer
1.5k
1.5k views
rahul sharma 5 asked Dec 5, 2016
1,473 views
Please help me in understanding the followign formulae?Prediction of the Length of the Next CPU Burst Pn+1 = a tn +(1-a)Pn This formula defines a...