StreakPeaked· Practice

ExamsGATETechnical

Consider a hard disk with 16 recording surfaces (0-15) having 6384 cylinders (0-6383) 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?

  1. 1281
  2. 1282
  3. 1283
  4. 1284

Correct answer: 1284

Solution

To find the cylinder number of the last sector, first calculate the total number of sectors needed for the file size of 42797 KB, which is 42797 * 1024 bytes. This results in 83,000 sectors. Starting from the initial location <1200, 9, 40>, the last sector will be located at <1200 + (83000 / 64), 9, (40 + (83000 % 64))>. This calculation leads to the last sector being in cylinder 1284.

Related GATE Technical questions

⚔️ Practice GATE Technical free + battle 1v1 →