Fall02 midterm 1-solutions

Operating System Concepts, Seventh Edition

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

View Full Document Right Arrow Icon
CS162 Fall 2002, Midterm One Solutions: mean: 61.71 Standard Deviation:11.76 ******************************************************************** Problem 1 (David Marin): ******************************************************************** - One of the biggest pitfalls was to confuse what is important about a job being "short" or "long". To minimize flow time, we want to run jobs that we can kick out of the system quickly; i.e. jobs with the smallest _remaining_ processing time; we don't care about their _total_ running time. SET only works because in most real systems, elapsed time is a good way of predicting remaining processing time. - A "realizable" algorithm means an algorithm you can actually implement (i.e. make real). SRPT and SJF, for instance, are not realizable unless you know the total running time of a job in advance. Several people apparently missed or didn't understand this word. If you ever don't understand a word on the test, and it appears to be important ("realizable" appears 8 times!) please ask one of the TAs. - This was the first problem on the test, and Professor Smith didn't announce until about halfway through that he only cared about minimizing average flow time (though from class, you should remember that average flow time is the most important metric of a scheduling algorithm). So I was willing to give partial or even full credit to solutions that (correctly) discussed the tradeoffs (e.g. lower flow time, but less variance) rather than just giving a ranking. - Smith also announced "no overhead" during the test. I didn't ever take off points for mentioning overhead, but I wouldn't give full credit for solutions that arrived at a different answer because of overhead (you can't make this judgment without knowing how much overhead there is). part a: Solution: >From best to worst, the algorithms are: SRPT, FCFS, RR, SET SRPT _always_ has the smallest average flow time. RR and SET will be alternating through all the jobs; since all jobs are about the same length, it will take a long time before any job leaves the system. FCFS will at least stick with the current job, and kick _it_ out, so it beats RR and SET. Why is RR better than SET? RR puts new jobs in the back of the queue, so currently running jobs at least get a little bit more of a chance to complete. SET will constantly be interrupting currently running jobs (that may have almost finished) with new jobs. Scoring: - 4 points for correct answer (-1 for each algorithm in the wrong
Background image of page 1

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

View Full DocumentRight Arrow Icon
place in the ranking) - 3 points for explanation usually get all 3 points) (2 points total for blank) Some people didn't rank RR and SET (they just said, SRPT good, FCFS average, RR&SET bad). You could do this and still get all 7 points (they both suck, and for pretty much the same reason). Ranking them _wrong_ would lose a point. If you didn't write anything at all about RR, you could get at 5 points. part b: Solution: SRPT isn't realizable (can't predict the that leaves FCFS as the
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.

This homework help was uploaded on 01/30/2008 for the course CS 162 taught by Professor Kubiatowicz during the Fall '02 term at Berkeley.

Page1 / 10

Fall02 midterm 1-solutions - CS162 Fall 2002, Midterm One...

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