File Systems
Linked block allocation Each block contains a header with –Number of bytes in the block –Pointer to next block Blocks need not be contiguous Files can expand and contract Seeks can be slow First block … Head: Length Byte 0 Byte Length Byte 0 Byte Length Byte 0 Byte Block 0Block 1Block N-1
DOS - Fat file system Disk Block File Descriptor Disk Block Disk Block … The actual Table Disk Block Disk Block Disk Block … … File Descriptor Logical view Physical view
Indexed Files Extract headers and put them in an index Simplify seeks May link indices together (for large files) Index block … Head: Byte 0 Byte Byte 0 Byte Byte 0 Byte Block 0 Block 1 Length
Index Structures Index Files Data Files max key Index block1 IB 2 IB Data block 5 Data block # Data block 6 Data block data
UNIX file structure Data mode owner … Direct block 0 Direct block 1 … Single indirect Double indirect Triple indirect inode Data Index Data Index Data Index Data
UNIX or Win NT/XP mount / binusretcany Joe DJ abc / more cdexyz / binusretcany JoeDJ abc / more cdexyz mount DJF at any DJF onetwo