Project ForgeSign up free
Computer Organization & Architecture
Memory Hierarchy & Floating Point
GATE 2013
Expert

Consider a hard disk with 16 recording surfaces (0-15) having 16384 cylinders (0-16383) and each cylinder contains 64 sectors (0-63). Data storage capacity in each sector is 512 bytes. Data are organized cylinder-wise and the addressing format is <cylinder no., surface no., sector no.>. A file of size 42797 KB is stored in the disk and the starting disk location of the file is <1200, 9, 40>. What is the cylinder number of the last sector of the file, if it is stored in a contiguous manner?

  • A1281
  • B1282
  • C1283
  • 1284

Explanation

File size in sectors = 42797KB / 0.5KB = 85594 sectors. Each cylinder holds 16×64=1024 sectors. Remaining sectors in cylinder 1200 from <9,40> onward: (64−40) on surface 9, plus 6 full surfaces (10-15)×64 = 24+384 = 408 sectors. Remaining needed after cylinder 1200 = 85594−408 = 85186 sectors. Full cylinders needed = floor(85186/1024) = 83 (cylinders 1201–1283, using 83×1024=84992 sectors), leaving 85186−84992=194 sectors spilling into the next cylinder, 1284 — so the file's last sector lies in cylinder 1284.

Source: GATE CS 2013 (2013)

This question is part of a 15-day revision cycle — sign in and Project Forge will bring it back the day before you'd forget it.

Start revising free