GateAI
File Systems

GATE CSE 2013 · Q29

MCQ2 marksMedium

Time

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.⟩\langle\text{cylinder no., surface no., sector no.}\rangle. A file of size 42797 KB is stored in the disk and the starting disk location of the file is ⟨1200,9,40⟩\langle 1200, 9, 40 \rangle. What is the cylinder number of the last sector of the file, if it is stored in a contiguous manner?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: D) 1284

File Systems

Given parameters:

  • Number of recording surfaces per cylinder = 1616

  • Number of sectors per track/surface = 6464

  • Capacity per sector = 512 bytes=0.5 KB512\text{ bytes} = 0.5\text{ KB}

  • Total sectors per cylinder = 16×64=1024 sectors16 \times 64 = 1024\text{ sectors}

Total sectors required for the file of size 42797 KB42797\text{ KB}:

Total sectors=42797×1024 bytes512 bytes=42797×2=85594 sectors\text{Total sectors} = \frac{42797 \times 1024\text{ bytes}}{512\text{ bytes}} = 42797 \times 2 = 85594\text{ sectors}

Starting address is ⟨1200,9,40⟩\langle 1200, 9, 40 \rangle:

  • The number of sectors preceding this address within cylinder 1200 is:

    Offset=9×64+40=576+40=616 sectors\text{Offset} = 9 \times 64 + 40 = 576 + 40 = 616\text{ sectors}
  • The number of sectors available in cylinder 1200 from the starting sector onward:

    1024−616=408 sectors1024 - 616 = 408\text{ sectors}

Remaining sectors to be allocated after cylinder 1200:

85594−408=85186 sectors85594 - 408 = 85186\text{ sectors}

Number of full cylinders occupied:

⌊85186/1024⌋=83 full cylinders\lfloor 85186 / 1024 \rfloor = 83\text{ full cylinders}

These correspond to cylinders 12011201 through 1200+83=12831200 + 83 = 1283.

Sectors allocated in the full cylinders:

83×1024=84992 sectors83 \times 1024 = 84992\text{ sectors}

Remaining sectors to be placed in the next cylinder:

85186−84992=194 sectors85186 - 84992 = 194\text{ sectors}

These remaining 194 sectors will reside in cylinder 12841284.

Therefore, the cylinder number of the last sector of the file is 1284 (Option D).

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This File Systems previous year question is Q29 of the GATE CSE 2013 paper. Find more GATE CSE PYQs on File Systems in Operating Systems, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related File Systems PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

File Systems in GATE CSE

File Systems has 14 GATE CSE PYQs across 14 papers from 2011 to 2026. 3 of them are 2-mark MCQs like this one, and it is the only one in GATE CSE 2013.

How GATE tests File Systems

More from GATE CSE 2013

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2013 · Q29 · MCQ

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 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?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.