CITS2002 Systems Programming  
prev
next CITS2002 CITS2002 schedule  

File Allocation Methods - Chained

The opposite extreme to contiguous allocation is chained allocation.

Here, the blocks allocated to a file form a linked list (or chain) and, as a file's length is extended (by appending to the file), a new block is allocated and linked to the last block in the file:

Chained File Allocation

A small "pointer" of typically 32 or 64 bits is allocated within each file data block to indicate the next block in the chain. Thus seeking within a file requires a read of each block to follow the pointers.

New blocks may be allocated from any free block on the disk. In particular, a file's blocks need no longer be contiguous.

 


CITS2002 Systems Programming, Lecture 15, p10, 18th September 2023.