One is contiguous allocation. With this
conceptually simple approach, the file system allocates adjacent blocks or clusters for the entire file. Contiguous
allocation has the merits that writing to and reading from the file are fast, because all the information is in the
same place on the disk. Some real-time systems and high-speed data acquisition systems use contiguous file
allocation for the reason of speed.
One of the problems with contiguous allocation is that external fragmentation of the file system becomes
a problem very quickly. The system must deliver a potentially large set of blocks to any new file, and the free
space between existing files may be unusable because each is, in itself, too small. Another problem is that
extending a file can be impossible due to lack of available space between allocations.
Another type of allocation is linked allocation of file space. Each block in a file is linked to the next
and the previous with pointers. This removes any requirement for contiguous allocation, eliminates external
fragmentation as a cause of wasted space, and permits extending files at any time. The starting block of a file
is all the system needs to know, and from there the system can follow the links between blocks.
Pages:
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342