operating-systems file-management
Definition
Free Space Management
Free space management refers to the techniques used by the OS to track and allocate unassigned blocks on a secondary storage device.
Tracking Methods
1. Bit Tables (Bitmap)
A vector where each bit represents one block on the disk.
0: Block is free.1: Block is allocated.- Pros: Very small space overhead. Fast at finding contiguous sequences of free blocks.
2. Chained Free Portions
A linked list of all free disk areas. Each entry in the list contains a pointer to the start of a free region and the number of blocks in that region.
- Cons: Becomes fragmented over time. Updating the pointers during file creation/deletion requires extra disk operations.
3. Indexing
The free space is managed as if it were a special system file. It stores the addresses of all free blocks in an indexed structure. This is efficient for all types of file allocation methods.