📖 Explanation
Let's break down the calculation for wasted space due to internal fragmentation.
First, calculate the usable data space per block:
A block is 64K=64×1024=65536 bytes. Since 4 bytes are reserved for the next block pointer, the usable data space is 65536−4=65532 bytes.
Next, determine the number of blocks required for the file:
The file size is 1M=1×1024×1024=1048576 bytes.
The number of blocks needed is ⌈Usable Data Space per BlockFile Size⌉=⌈655321048576⌉=⌈16.007⌉=17 blocks.
Now, calculate the total space allocated for these blocks:
Total allocated space = Number of blocks × Block size = 17×65536=1114112 bytes.
The total space used by the file, including pointers (except for the last block's NULL pointer, which is part of the 4 bytes):
Each of the 16 full blocks stores 65532 bytes of data. The last block stores the remaining data.
Total data bytes stored = 1048576 bytes.
Total pointer bytes stored = 16×4 bytes (for the first 16 blocks) + 4 bytes (for the last block's NULL pointer) = 17×4=68 bytes.
Total bytes used by file content and pointers = 1048576+68=1048644 bytes.
Finally, the wasted space due to internal fragmentation is:
Wasted space = Total allocated space - Total bytes used by file content and pointers
Wasted space = 1114112−1048644=65468 bytes.
[CORRECT_OPTION: 65468]