Question:

A data file with 1,50,000 student records is stored on disk with block size 4096 bytes.
Each index record consists of an ANum field of size 12 bytes and a record pointer of size 7 bytes. The number of blocks in the index file is \(\underline{\hspace{2cm}}\).

Show Hint

Always round up when calculating disk blocks because partial blocks still occupy full space.
Updated On: Dec 29, 2025
Hide Solution
collegedunia
Verified By Collegedunia

Correct Answer: 698

Solution and Explanation

Size of one index record: \[ 12 + 7 = 19 \text{ bytes} \] Number of index records: \[ 150{,}000 \] Total size of index file: \[ 150{,}000 \times 19 = 2{,}850{,}000 \text{ bytes} \] Block size: \[ 4096 \text{ bytes} \] Number of blocks required: \[ \frac{2{,}850{,}000}{4096} \approx 695.8 \] Rounding up (since records cannot be split across blocks): \[ 698 \] Final Answer: \[ \boxed{698} \]
Was this answer helpful?
0
0

Questions Asked in GATE CS exam

View More Questions