Best-fit
An allocation strategy that searches all free blocks and picks the smallest one that fits — minimizes wasted space but is slower than faster strategies.
When a filesystem needs to allocate blocks for a new file, best-fit scans the entire free-block list, finds the smallest block that fits the file, and allocates it. The idea is to choose a close match to avoid wasting large blocks on small files. The advantage: minimal fragmentation of free space. The downside: every allocation requires a full scan, which is slow on disks with many free blocks.
In practice, best-fit is rarely used — it's too slow. First-fit (take the first that fits) or next-fit (resume where the last search ended) are much faster, even if they cause more fragmentation. Modern allocation with bitmaps and B-trees can find a free block in O(log n) regardless of strategy, making these distinctions less relevant.