Consider a 512 GB hard disk with 32 storage surfaces. There are 4096 sectors per track and each sector holds 1024 bytes of data. The number of cylinders in the hard disk is
GATE 2024 CS1 Q.54: solution and answer
Answer and solution
ANSWER
The number of cylinders in the hard disk is 4096.
Official answer: 4096Source: Official answer key, GATE 2024 CS1 (IISc Bengaluru)
Bytes per track = (sectors per track) × (bytes per sector) = 4096 × 1024 = 2^{12} \times 2^{10} = 2^{22} \text{ bytes}.
Disk geometry: one cylinder consists of the same track on every surface, so total capacity = (number of cylinders) × (number of surfaces) × (bytes per track).
512 GB = 512 \times 2^{30} = 2^{9} \times 2^{30} = 2^{39} \text{ bytes} (using 1 GB = 2^{30} bytes).
Bytes per cylinder across all surfaces = 32 \times 2^{22} = 2^{5} \times 2^{22} = 2^{27} \text{ bytes}.
Number of cylinders = \dfrac{2^{39}}{2^{27}} = 2^{12} = 4096.
KEY IDEA
Disk capacity factors as (cylinders) × (surfaces, i.e. tracks per cylinder) × (sectors per track) × (bytes per sector). Compute bytes per track, multiply by the number of surfaces to get bytes per cylinder (across all surfaces), then divide total capacity by that to get the number of cylinders — keeping everything in powers of 2 avoids arithmetic slips.
WATCH OUT FOR
Forgetting to divide by the number of surfaces (computing cylinders as total bytes ÷ bytes-per-track only, i.e. treating the disk as single-surface), or using 1 GB = 10^9 bytes instead of the GATE convention 2^30 bytes, both of which give a wrong power of two.
From the GATE 2024 CS1 paper. Every question of this paper · Download the full paper · All 22 Memory & cache questions, with notes
More Memory & cache questions
- GATE 2024 CS2 Q.53 · NAT · 2 marksConsider a disk with the following specifications: rotation speed of 6000 RPM, average seek time of 5…
- GATE 2023 CS Q.42 · MCQ · 2 marksA 4 kilobyte (KB) byte-addressable memory is realized using four 1 KB memory blocks.
- GATE 2023 CS Q.64 · NAT · 2 marksAn 8-way set associative cache of size 64 KB (1 KB = 1024 bytes) is used in a system with 32-bit address.
- GATE 2022 CS Q.24 · MSQ · 1 markLet WB and WT be two set associative cache organizations that use LRU algorithm for cache block replacement.
