homework9 Version 0 |
|
👤 Author: by wangyl0911126com 2018-12-10 02:50:13 |
The three major methods of allocating disk space that are in wide use are contiguous allocating, linked allocating and indexed allocating.
In contiguous allocation, each file must occupy a set of contiguous blocks on the disk.
In linked allocation, each file is a linked list of disk blocks.
In indexed allocation, all the pointers to scattered blocks are placed together in one location.
On systems where there are multiple operating system, the decision to load a particular one is done by boot loader.
The VFS (virtual file system) activates file system specific operations to handle local requests according to their file system types.
The real disadvantage of a linear list of directory entries is the linear search to find a file.
Contiguous allocation of a file is defined by disk address of the first block & length.
One difficulty of contiguous allocation is finding space for a new file.
First fit and Best fit are the most common strategies used to select a free hole from the set of available holes.
The first fit and best fit algorithms suffer from external fragmentation.
To solve the problem of external fragmentation, compaction needs to be done periodically.
If too little space is allocated to a file, the file cannot be extended.