Linked allocation, also known as chained allocation, stores each file as a linked list of disk blocks where each block contains a pointer to the next block in the chain. This allows any free block to be added to the chain for a file. It is simple to implement as it only requires the starting address, but individual blocks cannot be randomly accessed and must be traced through the chain. A single damaged pointer can make many disk blocks inaccessible.
1. Linked Allocation
• Also known as chained allocation
• Each block contains pointer to next link in the
chain
• Reallocation is possible, it is more common to
allocate blocks as needed
1
http://raj-os.blogspot.in/ 1
2. Linked Allocation
• Each file is stored as a linked list of disk blocks
– the disk blocks may be anywhere on the disk
• Any free block can be added to a chain
2
http://raj-os.blogspot.in/ 2
3. Linked Allocation
• Simple – need only starting address
• Free-space management system – no waste of
space
• No random access
• No external fragmentation
3
http://raj-os.blogspot.in/ 3
4. Linked Allocation
• To select an individual block of a file requires
tracing through the chain to the desired block
• The file allocation table needs a single entry for each
file showing starting block and length of the file
4
http://raj-os.blogspot.in/ 4
6. Linked Allocation Advantages
• It is simple
• Solves the problems with contiguous allocation
– the space allocation problem
• No disk compaction is required
-because of non contiguous nature of allocation, the linking
does not produce any external fragmentation
6
http://raj-os.blogspot.in/ 6
7. Linked Allocation Disadvantages
• Slow
to find out nth block of a file we must start at the
beginning of that file space requirements for pointers
• Not reliable
disk blocks are linked by pointers, a single damaged
pointer can make thousands of disk blocks inaccessible
7
http://raj-os.blogspot.in/ 7
8. Linked Allocation Disadvantages
• Slow
to find out nth block of a file we must start at the
beginning of that file space requirements for pointers
• Not reliable
disk blocks are linked by pointers, a single damaged
pointer can make thousands of disk blocks inaccessible
8
http://raj-os.blogspot.in/ 8