In the indexed scheme of blocks to a file, the maximum possible size of the…
2015
In the indexed scheme of blocks to a file, the maximum possible size of the file depends on :
- A.
The number of blocks used for index and the size of index
- B.
Size of Blocks and size of Address
- C.
Size of index
- D.
Size of block
Attempted by 358 students.
Show answer & explanation
Correct answer: A
Key idea: maximum file size in indexed allocation is equal to the number of index entries (pointers) multiplied by the size of each data block.
Number of index entries = index size (in bytes) ÷ address (pointer) size (in bytes).
Maximum file size = (number of index entries) × (block size).
Example: if the index size is 4096 bytes and each address is 4 bytes, the index can hold 4096 ÷ 4 = 1024 pointers. If the block size is 1024 bytes, the maximum file size = 1024 × 1024 bytes = 1,048,576 bytes.
Why this answers the question: the maximum file size depends on the index capacity (which depends on index size and address size) and on the block size. Any answer that omits either the index capacity factors or the block size is incomplete.
If only block size and address size are given, you still need the index size to compute how many pointers fit.
If only index size is given, you still need block size to convert pointer count to total bytes.