1
CPSC 410--Richard Furuta 4/28/99 1
Silberschatz and Galvin Chapter 11
File System Implementation
CPSC 410--Richard Furuta 4/28/99 2
Silberschatz and Galvin Chapter 11 File System Implementation CPSC - - PDF document
Silberschatz and Galvin Chapter 11 File System Implementation CPSC 410--Richard Furuta 4/28/99 1 File System Implementation: Overview Organization Allocation Free-space management Directory implementation CPSC 410--Richard
CPSC 410--Richard Furuta 4/28/99 1
CPSC 410--Richard Furuta 4/28/99 2
CPSC 410--Richard Furuta 4/28/99 3
CPSC 410--Richard Furuta 4/28/99 4
CPSC 410--Richard Furuta 4/28/99 5
CPSC 410--Richard Furuta 4/28/99 6
CPSC 410--Richard Furuta 4/28/99 7 Payload Information . . . . . . . . . . . . . . . . . .
File Name Start length jeep 2 5
Block 0 Payload Information . . . . . . . . . . . . . . . . . . Block 1 Block 3 Payload Information . . . . . . . . . . . . . . . . . . Block 2 Payload Information . . . . . . . . . . . . . . . . . . Block 4 Payload Information . . . . . . . . . . . . . . . . . . Block 5 Payload Information . . . . . . . . . . . . . . . . . . Block 7 Payload Information . . . . . . . . . . . . . . . . . . Block 6 Payload Information . . . . . . . . . . . . . . . . . . Block 8 Payload Information . . . . . . . . . . . . . . . . . . Block 9 Payload Information . . . . . . . . . . . . . . . . . . Block 11 Payload Information . . . . . . . . . . . . . . . . . . Block 10
Directory Information
Payload Information . . . . . . . . . . . . . . . . . . CPSC 410--Richard Furuta 4/28/99 8
CPSC 410--Richard Furuta 4/28/99 9
CPSC 410--Richard Furuta 4/28/99 10
CPSC 410--Richard Furuta 4/28/99 11
CPSC 410--Richard Furuta 4/28/99 12 Payload Information . . . . . . ___________ next block ptr
File Name Start End jeep 2 10
Block 0 Payload Information . . . . . . ___________ next block ptr Block 1 Payload Information . . . . . . ___________ next block ptr Block 3 Payload Information . . . . . . ___________ next block ptr Block 2 Payload Information . . . . . . ___________ next block ptr Block 4 Payload Information . . . . . . ___________ next block ptr Block 5 Payload Information . . . . . . ___________ next block ptr Block 7 Payload Information . . . . . . ___________ next block ptr Block 6 Payload Information . . . . . . ___________ next block ptr Block 8 Payload Information . . . . . . ___________ next block ptr Block 9 Payload Information . . . . . . ___________ next block ptr Block 11 Payload Information . . . . . . ___________ next block ptr Block 10
Directory Information
CPSC 410--Richard Furuta 4/28/99 13
¥ Advantages: Ð no external fragmentation Ð no compaction needed Ð easy to modify file (insert/delete blocks) ¥ Disadvantages Ð access method: sequential access only Ð reliability: recovery difficult if pointers lost Ð disk space efficiency: needed space for pointers is ÒwastedÓ ¥ one option: clusters (collect blocks into multiples and allocate cluster not block). Expense: internal fragmentation
CPSC 410--Richard Furuta 4/28/99 14
CPSC 410--Richard Furuta 4/28/99 15
CPSC 410--Richard Furuta 4/28/99 16 Payload Information . . . . . . . . . . . . . . . . . .
File Name Index Block jeep 3
Block 0 Payload Information . . . . . . . . . . . . . . . . . . Block 1 block 2 block 7 block 6 block 9 block 10
Payload Information . . . . . . . . . . . . . . . . . . Block 2 Payload Information . . . . . . . . . . . . . . . . . . Block 4 Payload Information . . . . . . . . . . . . . . . . . . Block 5 Payload Information . . . . . . . . . . . . . . . . . . Block 7 Payload Information . . . . . . . . . . . . . . . . . . Block 6 Payload Information . . . . . . . . . . . . . . . . . . Block 8 Payload Information . . . . . . . . . . . . . . . . . . Block 9 Payload Information . . . . . . . . . . . . . . . . . . Block 11 Payload Information . . . . . . . . . . . . . . . . . . Block 10
Directory Information
CPSC 410--Richard Furuta 4/28/99 17
CPSC 410--Richard Furuta 4/28/99 18
CPSC 410--Richard Furuta 4/28/99 19
CPSC 410--Richard Furuta 4/28/99 20
CPSC 410--Richard Furuta 4/28/99 21
CPSC 410--Richard Furuta 4/28/99 22
CPSC 410--Richard Furuta 4/28/99 23
CPSC 410--Richard Furuta 4/28/99 24
CPSC 410--Richard Furuta 4/28/99 25
CPSC 410--Richard Furuta 4/28/99 26
1 2 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 5 Free space list head n = the size of block = 4 3 5 10 12 Block 2: 13 18
CPSC 410--Richard Furuta 4/28/99 27
CPSC 410--Richard Furuta 4/28/99 28
CPSC 410--Richard Furuta 4/28/99 29
1 2 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 5 Free space list head n = the size of block = 4 2
Block 2: 2
Block 12: 1
Block 5: 1
Block 10:
CPSC 410--Richard Furuta 4/28/99 30
CPSC 410--Richard Furuta 4/28/99 31
CPSC 410--Richard Furuta 4/28/99 32
CPSC 410--Richard Furuta 4/28/99 33
CPSC 410--Richard Furuta 4/28/99 34
CPSC 410--Richard Furuta 4/28/99 35