Download presentation
Presentation is loading. Please wait.
1
File Systems
2
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: 417 ... Length Length Length Byte 0 Byte 0 Byte 0 ... ... ... Byte 4095 Byte 4095 Byte 4095 Block 0 Block 1 Block N-1
3
DOS - Fat file system … … File Descriptor Disk Disk Block Disk Block
43 254 … 107 Disk Block Disk Block Disk Block Logical view File Descriptor 43 254 43 … 107 Disk Block Disk Block 107 Disk Block … 254 Physical view The actual Table
4
Indexed Files Extract headers and put them in an index Simplify seeks
May link indices together (for large files) Byte 0 ... Index block … Head: 417 ... Byte 4095 Length Block 0 Length Byte 0 ... Byte 4095 Block 1 Byte 0 ... Length Byte 4095
5
Index Structures Index Files Data Files max key Data block # 275 50
100 150 200 1 2 3 4 251 252 275 299 201 202 250 data max key IB 2 200 400 600 2 3 4 Data block 5 Data block 6 300 350 Index block1 250 300 350 5 6 7 IB 3 Data block 7
6
*X file structure inode Data Data Index Data Index Data Index Data
mode owner … Direct block 0 Direct block 1 Single indirect Double indirect Triple indirect Data Data Index Data Index Data Index Data
7
Indexed Systems this slide needs work
Level Number of Blocks Number of Bytes Direct N (10) 10K Single indirect 256 256*1K/block=256K Double indirect 256 256 = 65K blocks 65K blocks * 1K/block=65M bytes Triple indirect 256 65K = 64M blocks >16G bytes (64blocks*256K/block=16GB) Blocksize=1K = 1024 bytes 1024/4=256 (size of a pointer)
8
*X or Win* mount Joe DJF mount DJF at any / / bin usr etc any bin usr
one two abc cde xyz DJF / more abc cde xyz mount DJF at any more
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.