Answer: 65468:65468
To find the space wasted due to internal fragmentation, we need to determine how the file is distributed across the disk blocks under the linked allocation scheme.
1. Given Parameters
- Disk Block Size: 64 K=64×1024=65,536 bytes
- Pointer Size: 4 bytes
- Usable Data Space per Block: 65,536−4=65,532 bytes
- File Size: 1 M=1,048,576 bytes
2. Number of Blocks Required
The number of blocks N required to store the file is calculated as:
N=⌈Usable Data Space per BlockFile Size⌉=⌈65,5321,048,576⌉=⌈16.00104⌉=17 blocks
3. Distribution of File Data
- The first 16 blocks are completely filled with file data.
Data stored in first 16 blocks=16×65,532=1,048,512 bytes
- The remaining file data is stored in the 17th (last) block:
Data in the last block=1,048,576−1,048,512=64 bytes
4. Internal Fragmentation
Internal fragmentation occurs in the last block because it is allocated but not fully utilized. The space used in the last block is for the 4-byte NULL pointer and the 64 bytes of file data.
Wasted Space=Block Size−(Pointer Size+Data in Last Block)=65,536−(4+64)=65,536−68=65,468 bytes