Consider a hard disk with recording surfaces having cylinders and each cylinder contains sectors . Data storage capacity in each sector is bytes. Data are organized cylinder-wise and the addressing format is . A file of size KB is stored in the disk and the starting disk location of the file is . What is the cylinder number of the last sector of the file, if it is stored in a contiguous manner?
View worked solution
Answer: D
To find the cylinder number of the last sector of the file, we first calculate the total number of sectors required for the file and then determine their physical layout on the disk.
1. Calculate the number of sectors required:
- File size =
- Sector capacity =
- Total sectors required =
2. Calculate the capacity of one cylinder:
- Sectors per cylinder =
3. Determine the distribution of sectors:
- The file starts at .
- Sectors already used in cylinder before the start of the file = (numbered to ).
- Sectors remaining in cylinder = sectors.
- Sectors left to be stored in subsequent cylinders = sectors.
4. Find the final cylinder:
- Number of full cylinders occupied after cylinder = cylinders (which are cylinders to ).
- Remaining sectors = sectors.
These remaining sectors will be stored in the next cylinder, which is cylinder .
Free practice · Your answers on this page are not saved.
