Lecture 40,41
Lecture 40,41
Concepts
LECTURE 40,41 – FILE MANAGEMENT: RECORD BLOCKING, FILE
ALLOCATION METHODS, FREE SPACE MANAGEMENT
Record Blocking
Variable-length records are used and are packed into blocks with no
unused space.
Some records may span multiple blocks
Continuation is indicated by a pointer to the successor block
Variable Blocking: Spanned
Variable-length unspanned blocking
File allocation table contains a separate one-level index for each file
The index has one entry for each portion allocated to the file
Typically, the file indexes are not physically stored as part of the file allocation
table.
Rather, the file index for a file is kept in a separate block, and the entry for the file in
the file allocation table points to that block.
The file allocation table contains block number for the index
Allocation may be either
Fixed size blocks or
Variable sized blocks
Allocating by blocks eliminates external fragmentation
Indexed allocation with Block
Portions
Indexed Allocation with Variable
Length Portions
Free Space Management
This method uses a vector containing one bit for each block on the disk.
Each entry of a 0 corresponds to a free block,
and each 1 corresponds to a block in use.
Advantages:
Works well with any file allocation method
Small as possible
Chained Free Portions
Treats free space as a file and uses an index table as it would for file
allocation
For efficiency, the index should be on the basis of variable-size portions
rather than blocks.
Thus, there is one entry in the table for every free portion on the disk.
This approach provides efficient support for all of the file allocation
methods.
Free Block List