hw5 - CS112 - Homework #5 1. This problem is about the...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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

Page1 / 2

hw5 - CS112 - Homework #5 1. This problem is about the...

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

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