In contiguous disk space allocation method, ﬁles are assigned to contiguous areas of secondary storage. A user speciﬁes in advance the size of the area needed to hold a ﬁle to be created. If the desired amount of contiguous space is not available, the ﬁle cannot be created.
Two most common strategies are
- First ﬁt
- Best ﬁt.
1. First ﬁt
In this case as soon as the ﬁrst hole (that is big enough) is encountered, searching is stopped and memory is allocated for creating a ﬁle.
Searching can start either at the beginning of the set of holes or where the previous ﬁrst-ﬁt search ended.
2. Best ﬁt
In this case the entire list is searched for and the smallest hole, that is big enough, is allocated for creating a ﬁle.