Complete Computer Knowledge Portal

Sunday, May 5, 2013

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.

3) With the use of clusters internal fragmentation increases.

4) If any pointer lost or damaged that will result in wrong linking or link to empty space. This Problem is resolved by FAT (File allocation table) which contains all pointer values for a file.

No comments:

Post a Comment