This preview shows pages 1–2. 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: CS112 - Homework #5 1. This problem is about the performance of different scheduling schemes for read/write operations of a disk. Assume there are n independent requests for disk reads/writes which are uniformly distributed among all disk cylinders. For simplicity, we assume the requests follow continuous uniform distribution between 0 and C , for some C > 0. Also, we assume that initially the read/write head of the disk is at position 0 and after serving these n reads/writes, the read/write head will move back to position 0. (a) The first scheme is to collect all the n requests, sort them according to location (cylinder), then serve the requests with one scan. With this scheme, the distance that the read/write head moves is 2 times the maximal distance from 0 among all n requests. Compute the expectation of this distance. (b) The second scheme is first come first serve . With this scheme, the distance that the read/write head moves consists of 3 parts: 1. From position 0 to the location of the first job. 2. From the position of the 1 st job to the 2 nd job + 2 nd to 3 rd + ... + ( n- 1) th to n th . 3. From the position of the n th job back to position 0....
View Full Document
- Spring '08