operating-systems file-management

Definition

Blocking

Blocking is the mapping of logical user records onto physical disk blocks. Since user records rarely match the fixed size of hardware sectors, the operating system must pack or split records to optimise storage utilisation.

Methods

Fixed Blocking

Records have fixed length, and an integral number of records fill each block.

Cost: Internal fragmentation — unused space at block end is wasted.

Variable Blocking — Spanned

Records have variable length and may span multiple block boundaries.

Benefit: Zero internal fragmentation.
Cost: Reading a spanned record requires at least two I/O operations.

Variable Blocking — Unspanned

Records have variable length but cannot cross block boundaries.

Cost: If a record does not fit in the block remainder, that space is wasted and the record starts in the next block.