(ii). INDEXED ALLOCATION
• Each file uses an index block on disk to contain addresses of other disk blocks used by the file.
• When the i th block is written, the address of a free block is placed at the i th position in the index block.
• Method suffers from wasted space since, for small files, most of the index block is wasted. The optimum size of an index block is
• If the index block is too small, we can:
a) Link several together
b) Use a multilevel index

 

 

UNIX keeps 12 pointers to blocks in its header. If a file is longer than this, then it uses pointers to single, double, and triple level index blocks.