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?
- A. (a) 92 ms, (b) about 13.35 s
- B. (a) 40 ms, (b) about 13.35 s
- C. (a) 67.5 ms, (b) about 8.23 s
- 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
- A machine has 40-bit virtual addresses, 16 KB pages and 4-byte page-table entries. Every page table at every level must fit in a single…
- A 32-bit system uses two-level paging: 10 bits for the outer index, 10 bits for the inner index and a 12-bit offset, with 4-byte entries…
- A 32-bit system uses two-level paging with a 10-bit outer index, a 10-bit inner index and a 12-bit offset. The virtual address 0xC0A8F3E7…
- A system with a TLB and a two-level page table has TLB access time 10 ns (searched before memory), memory access time 100 ns and a TLB hit…
- Memory access takes 200 ns. A page fault takes 8 ms to service if the replaced page is clean and 20 ms if it is dirty, and 40% of replaced…
- An inode has 10 direct pointers, one single-indirect, one double-indirect and one triple-indirect pointer. Blocks are 2 KB and block…