written 5.7 years ago by | • modified 5.3 years ago |
Linked allocation:
There are 3 typical file allocation methods:
contagious allocation.
Linked allocation.
Indexed allocation.
Linked allocation is also called chain allocation o.s keeps on ordered list of free blocks. file descriptor stores pointers to the front block and each block stores printer to the next block.
Above list shows linked allocation. The disk block mag |x anywhere on the disk the directory contains a pointer to front and last block of the file.
No space is lot to disk fragmentation and creation of new file in easy by simply creating a new entry in the directory.
Reading a file in straight forward as here user simply read block by following pointer from block to block.
There is no extend fragmentation with linked allocation.
To create the file system, find a free block and this new block is written to and linked to the end of the file.
while creating a new file, it is not necessary to declare the size of the file. a file can contagious to grow as long as free block are available.
Can action can be used so that block os one file are located continuously on the disk and it optimizes disk access.
Following are characteristics of linked allocation.
it support fixed size portions.
pre allocation is possible.
File allocation table is one entry for a file.
Allocation frequency is low to high.
Advantages:
There is no extend fragmentation.
It is never necessary to compact disk space.
Pre allocation is not required.
Disadvantages:
File can be succeed only sequentially.
Space is required for printer.
Reliability is not so good.
It cannot support direct access to files.