IAE Academy

GATE 2024 CS2 Q.53: solution and answer

GATE 2024 · CS2Q.53 · 2 marks · NAT

Consider a disk with the following specifications: rotation speed of 6000 RPM, average seek time of 5 milliseconds, 500 sectors/track, 512-byte sectors. A file has content stored in 3000 sectors located randomly on the disk. Assuming average rotational latency, the total time (in seconds, rounded off to 2 decimal places) to read the entire file from the disk is ________

See the question in the paper

Answer and solution

ANSWER

The total time to read the entire file is seconds.

Official answer: 29.50 to 30.50Source: Official answer key, GATE 2024 CS2 (IISc Bengaluru)

  1. Rotation speed = 6000 RPM = 100 revolutions/second, so time for one full rotation = .

  2. Average rotational latency = time for half a rotation = .

  3. In one rotation, all 500 sectors of a track pass under the head, so transfer time per sector = .

  4. The 3000 sectors of the file are located randomly on the disk, so consecutive sectors cannot be assumed adjacent — each sector access is an independent disk access requiring its own seek, its own rotational latency, and its own transfer time.

  5. Time for one sector access = seek time + rotational latency + transfer time = .

  6. Total time for the file = .

KEY IDEA

When the sectors of a file are scattered randomly across the disk (not contiguous), the disk cannot amortize a single seek and a single rotational delay over the whole transfer. Every sector must be treated as an independent access: its own seek, its own average rotational latency, and its own transfer time — and these per-sector times are simply summed over all sectors in the file.

WATCH OUT FOR

Treating the 3000 sectors as one contiguous read: charging a single seek and a single rotational latency for the whole file and then adding only the total transfer time (3000 × 0.02 ms). That undercounts massively (a few seconds instead of ~30 s) because it ignores that "randomly located" sectors each require their own seek and rotational delay.

From the GATE 2024 CS2 paper. Every question of this paper · Download the full paper · All 22 Memory & cache questions, with notes

More Memory & cache questions