File System · 4.3
Free-Space Management
When files are created or deleted, the operating system must quickly answer one question: which disk blocks are available for the next file?
Interactive free-space map
Click any block to mark it free or allocated. The same physical state can be represented using different bookkeeping methods.
Free blocks
14 / 48
Allocated blocks
34 / 48
Free-space ratio
29%
Bitmap representation: one bit records whether each block is free or used, making scans compact and easy to update.
Free-space strategies
Bitmap — A bit array with one bit per disk block; 0 and 1 represent free and allocated states.
Linked list — All free blocks are linked together, often with a head pointer in the file-system metadata.
Grouping / counting — Groups store many free addresses or record a start block plus a run length.
Real-world analogy: Parking spaces
A bitmap is a row of occupied signs, a linked list is a chain of empty-space pointers, and counting records an empty stretch as “spaces 20–27 are free.”
Quick quiz
1. In a bitmap, what does each bit represent?
2. Counting is especially useful when free blocks are…