GATE / CS ARCHIVE

GATE CSE 2002 / QUESTION 2.22

Capacity under indexed allocation

Operating Systems · File Systems · Full GATE CSE 2002 paper

GATE 2002, Q2.22 2 marks · MCQ
Report issue

File Systems

Question 2.22, GATE 2002: In indexed file-block allocation, on what does the maximum possible file size depend?
(A) Block size and block-address size.
(B) Number of index blocks and block size.
(C) Block size, number of index blocks, and block-address size.
(D) None of these.
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

Step 1: Track the dimensions of the capacity calculation.

Step 2: Each index block contains floor(B/p) addresses. I such blocks contain I·floor(B/p) addresses in a flat organization, and each address identifies a B-byte data block. Multiplying gives I·floor(B/p)·B bytes. Omitting address size ignores how many pointers fit, while omitting index-block count ignores how many such pointer containers are available.

Conclusion: If I index blocks of B bytes store addresses of p bytes each, a simple flat index addresses I·floor(B/p) data blocks, giving roughly IB²/p file bytes. Thus block size, index-block count and address size all affect capacity, C. Multilevel structures alter the detailed formula, not the need to account for these quantities.

Original paper, page 6