- Random access is impossible (only suitable for serial access).
- Blocks are no longer a round size. (For example, if blocks were 512 bytes on underlying device, and pointer size were 32-bits, effective size of disk blocks in a linked-list scheme is now 512-4 = 508 bytes, which is awkward.)
Problem: Chain is difficult to maintain in order, so it easily becomes fragmented (in the sense of 'not in order of block address', not in the sense of internal or external fragmentation). Thus when file blocks are allocated from the free chain, the files themselves become badly fragmented.
Alternative approach: Store a bitmap on disk of free blocks. Can easily be used to identify unused blocks. Blocks are naturally allocated in order of block address, and so file fragmentation becomes less severe.
Exactly the same space overhead (one pointer per block).
Number of blocks = 720K ÷ ½K = 1440 blocks
=> size of FAT = #blocks × FAT entry size
= 1440 × 12 bits
= 17280 bits
= 17280 bits ÷8 bits/byte = 2160 bytes = ~2.1KbytesOccupies 2160÷512 = ~4.2 blocks
=> require 5 disk blocks to hold FAT.
With indexed block allocation scheme one stores a table which maps logical blocks in the file to physical blocks on the disk, (analagously to a page table, mapping virtual pages to physical frames in a paged memory system).
One approach is to store the table directly in the directory entry/inode ('direct block index'). Alternatively the table may be stored in a disk block by itself ('indirect block index'), with the directory entry/inode referring to the index block.
Two or more levels of indirection are also possible. UNIX uses a combined approach, with direct blocks for small files, and single, double or triple indirection for larger files.
Pointer size = 32÷ 8 bits/byte = 4bytes.
# pointers per block = 2K ÷ 4 = 512 pointers/block.=> Single indirect block references 512 × 2KB = 1MB
=> Double indirect block references 512 × 1MB = 512MB
=> 4 double indirect blocks reference 4 × 512MB = 2GB
Hard links are based on inode number. With hard links, essentially there are many directory entries refering to the same file (represented by an inode). The file is not deleted, for example, until all hard links to it have been deleted.
Soft links are based on file name. A soft link is a file which contains only a reference to another file. The 'other file' is the original. It may be deleted, leaving the soft link pointing at a non-existant file.