Showing posts with label Linked Allocation. Show all posts
Showing posts with label Linked Allocation. Show all posts

Wednesday, 21 January 2015

Linked Allocation

It is a disk allocation technique in which files are stored in a linked fashion and scattered way. Directory entry is used that contains pointer to first disk block of file and each block contains pointer to next block.

These Pointers are not made visible to users. Each block has 512 bytes in size out of which 4 bytes are used to store pointer and rest 508 bytes is used by the user.

This Technique has the advantage that there is no external fragmentation and files can be stored anywhere. Another advantage is that there is no need to define the size of file and it can grow as long as free blocks are available.
 

Problems Associated:
1) Files can be accessed in a serial fashion. E.g. to access nth   block of disk we have to start from beginning until nth block comes.

2) Another problem is that extra 4 bytes are consumed from each block for the storage of pointers. This problem is resolved by the use of clusters. Cluster is a combination of blocks into multiples. e.g. 5 blocks of disk can be used as single cluster and only one pointer will be required for 5 blocks.