A block can only be recombined with its buddy. There is a free list for each possible block size. Set the size of the block at a to 2i. Put the block at address a on listi. Binary Search requires that the file be sorted by the search key Internal sort of the file - Read it into RAM and do an efficient sort Problems 1.
Binary search is too slow.
It is very costly to keep a dynamic file sorted 3. Don't read the entire file into RAM, just Step 1. Read the file and build a table of keys and associated RRNs or byte offsets Step 2. Sort the table Step 3. Go thru the table and read the records in sorted order writing them out to a new file in which their physical order is the sorted order.