What are the common strategies to select a free hole from a set of available holes?

The most common strategies are

a. First fit

First fit allocates the first hole that is big enough. Searching can either start at the beginning of the set of holes or where the previous first-fit search ended. Searching can be stopped as soon as a free hole that is big enough is found.

b. Best fit

Best fit allocates the smallest hole that is big enough. The entire list has to be searched, unless it is sorted by size. This strategy produces the smallest leftover hole.

c. Worst fit

No comments

Powered by Blogger.