Fa99 midterm-solutions - This are very quick solutions I...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
This are very quick solutions I came up with. I do not guarantee they are correct, but they should be close. If you find possible errors, feel free to post to the newsgroup. Question 1: Here are the possible sequences: (x,y) a,f,b,c,d,e,g,h,i,j = (0,2) a,f,g,h,i,j,b,c,d,e = (2,3) f,a,b,c,d,e,g,h,i,j = (2,0) f,a,g,h,i,j,b,c,d,e = (2,1) a,b,c,d,e,f,g,h,i,j = (4,0) note, you can have cases like: f,g,h,i,a,j,b,c,d,e but they turn out to be redundant (the x,y pair has already been shown) Question 2: FIFO Time 0 5 10 15 20 #1 ********** = done at 5 #2 ****** = done at 8 #3 ************ = done at 14 #4 *** = done at 15.5 average run time = 5 + 7 + 12 + 12.5 = 36.5 /4 = 9 RR assuming that when a task is done, it is put at the end of the ready queue also, when a process arrives, it is put at the end of the queue, and in fact, is put after the one that is running during the time slot it arrived in. ok, I think this is right, but it might be off by a little. . it's hard to keep track of all this info. . Time 0 5 10 15 20 #1 *** * * * * * * * = done at 12.5 #2 * * * * * * = done at 10.5 #3 * * * * * * ****** = done at 15.5 #4 * * * = done at 9 average run time = (12.5 + 9.5 + 13.5 + 6)/4 = 10.4 STCF Time 0 5 10 15 20 #1 ********** = done at 5
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
#2 ****** = done at 9.5 #3 ************ = done at 15.5 #4 *** = done at 6.5 average run time = (5 + 8.5 + 13.5 + 3.5)/4 = 7.6 SRTCF Time 0 5 10 15 20 #1 ** ******** = done at 9.5 #2 ****** = done at 4 #3 ************ = done at 15.5 #4 *** = done at 5.5 average run time = (9.5 + 3 + 13.5 + 2.5)/4 = 7.1 SET Time 0 5 10 15 20 #1 ** * * * * * * * * = done at 14 #2 ** * * * * = done at 10 #3 ** * * * * * * * *** = done at 15.5 #4 ** * = done at 6 average run time = (14 + 9 + 13.5 + 6 )/4 = 10.6 Question 3:
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

Fa99 midterm-solutions - This are very quick solutions I...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online