Answer:
There are three main disk space or file allocation methods.
• Contiguous Allocation
• Linked Allocation
• Indexed Allocation
By the performance level
Contiguous allocation > linked Allocation > Indexed Allocation
Contiguous is faster than linked allocation and both contiguous and linked are faster than indexed.
As linked allocation does not support direct access and the indexed allocation , the pointer of it is bigger than linked allocation
Explanation:
1.Contiguous Allocation :
In this scheme, each file occupies a contiguous set of blocks on the disk.
> It supports both accesses (sequential and direct)
> Its extremely fast as the number of seeks are minimal because of contiguous allocation of file blocks.
but on the other hand it has some disadvantages as
> It can not deal with fragmentation whether its external or internal.
> And also increasing the size of it may get difficult.
2. Linked Allocation:
In this type of allocation, each file is a linked list of disk blocks and the disk blocks can be scattered anywhere on the disk.
> This type is very flexible with the file size.
> This method also does not suffer from external fragmentation. This makes it better in terms of memory utilization.
> It does not support random or direct access while it slightly support sequential access.
3. Indexed Allocation:
There is a special block known as the Index block contains the pointers to all the blocks occupied by a file in this type of allocation. Each file has its own index block.
> This type supports direct access therefore provides fast access to the file blocks.
> It also overcomes with the problem of external fragmentation.