CS FundamentalsVery hardProduct company interview · GATE level

A disk spins at 12,000 RPM, has 250 sectors of 512 bytes per track, an average seek time of 4 ms and a track-to-track seek time of 0.5 ms. A 1 MB file (1 MB = 2^20 bytes) is read (a) when stored on 8 consecutive tracks, each read in full after the average rotational latency, and (b) when its 2048 sectors are scattered randomly, each needing an average seek and average latency. What are the two read times?

  1. A. (a) 92 ms, (b) about 13.35 s
  2. B. (a) 40 ms, (b) about 13.35 s
  3. C. (a) 67.5 ms, (b) about 8.23 s
  4. D. (a) 67.5 ms, (b) about 13.35 s

Correct answer: D. (a) 67.5 ms, (b) about 13.35 s

One rotation takes 60/12000 s = 5 ms, so average latency is 2.5 ms and one sector passes in 5/250 = 0.02 ms. A track holds 250 x 512 = 128 KB, so the file is 8 tracks. (a) First track: 4 + 2.5 + 5 = 11.5 ms; each of the other 7: 0.5 + 2.5 + 5 = 8 ms; total 67.5 ms. (b) Each sector: 4 + 2.5 + 0.02 = 6.52 ms, times 2048 = 13,353 ms. Placement changes the time by a factor of about 200. 40 ms counts only the 8 rotations; 8.23 s leaves out the rotational latency in (b).

More Operating Systems questions

Exams that ask this topic