This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: file:///C|/Documents%20and%20Settings/Jason%20Raftery/My%20Doc...ence%20162%20-%20Fall%202000%20-%20Smith%20-%20Midterm%202.txt Exam 2 - Official Solutions (i.e. prepared by the professor and the TAs) Graded by Smith: 1. Assume that the mean job processing time is 10, and that the task switching overhead is 0.5. (I.e. at the end of every interval of length Q, the CPU experiences a task switch event.) Assume round robin scheduling. Assume that Q (the round robin quantum) ranges from .001 to 1000. Plot the shape of the mean flow time as a function of Q and explain. (No credit unless your explanation matches your plot.) (9) The situation is just the same as in assignment 1: we have a computer system (with job run times that are highly skewed), and round robin scheduling. When the quantum is much less than the mean job processing time (job run time), then there is a huge level of overhead due to task switching. (For Q=.001, overhead is 99.8%). As the quantum increases, mean flow time (time from arrival at the rear of the queue until completion and departure) decreases, until the quantum is in the neighborhood of the mean run time. (Not necessarily equal to the mean run time.) As the quantum continues to increase, the mean flow time increases again (but to a much lesser extent than for very small quanta), since as Q--> infinity, RR-->FIFO, and FIFO has much higher flow time than RR for highly skewed job run times. Notes: 1. a couple of people described job run times as "exponential". They are NOT. Expected time to completion for exponential distribution is constant. 2. some people misread the question and thought that a job continued to use the processor through the end of the quantum, even if it didn't need it. I gave some partial credit for that.---------------------------------------------- 2. Suppose we have a disk with 512 cylinders, and the disk is currently at cylinder 110 (and has previously just processed a request for cylinder 105) and the disk queue contains read/write requests for sectors on cylinders 84, 302, 103, 96, 407 and 113. (15) 2a. How far must the head travel to satisfy the requests in the queue using FCFS scheduling? (If the arm goes from cylinder 10 to 20 to 14, that is a total of 16 cylinders moved.) file:///C|/Documents%20and%20Settings/Jason%20Rafte...20-%20Fall%202000%20-%20Smith%20-%20Midterm%202.txt (1 of 7)1/27/2007 4:00:30 PM file:///C|/Documents%20and%20Settings/Jason%20Raftery/My%20Doc...ence%20162%20-%20Fall%202000%20-%20Smith%20-%20Midterm%202.txt 2b. How far must the head travel to satisfy the requests in the queue using the SCAN arm scheduling strategy?...
View Full Document
This note was uploaded on 05/17/2009 for the course CS 162 taught by Professor Kubiatowicz during the Spring '02 term at University of California, Berkeley.
- Spring '02
- Computer Science