In Linked Allocation the pointers along with the blocks were scattered across the disk and needed to be retrieved in order by visiting each block for accessing the file.
To solve this problem Indexed Allocation is used.
In indexed allocation method, all the pointers are gathered together into one location known as Index Block.
Each file has its own index block which stores the addresses of disk space occupied by the file.
Directory contains the addresses of index blocks of files.
When a file is created initially, all pointers in the index block are set to null value.
As new blocks are written, the pointers are modified accordingly.
Advantage: Indexed allocation supports direct access and does not suffer from any external fragmentation.
Disadvantage: Indexed allocation suffers from the problem of wasted space.