homework 9 Version 0 |
|
👤 Author: by 335417758qqcom 2019-12-11 15:36:44 |
Contiguous Allocation
Each file occupy a set of contiguous blocks on the disk
Advantages:
The number of disk seeks required for accessing contiguously allocated files is minimal,as is seek time when a seek isfinally needed.
Accessing a file that has been allocated contiguously is easy
Disadvantages:
One difficulty is finding space for a new file ,which is also called dynamic storage-allocation problem
Determing how space is needed for a file.We don't know the size of the file to be allocated,It will cause some problems
Linked Allocation
Each file is a likned list of disk blocks.Each block contains a pointer to the next block
Advantages:
solves all problems of contiguous allocation
There is no external fragmentation with lined allocation,and free block on the free-space list can be used to satisfy a request
Disadvantages:
It can be used effectively only for sequential-access files.It is in efficient to support a direct-access capability for linked-allocation files
It need the space required for the pointer
Reliability,the pointer may lost.
Indexed Allocation
solves this peoblem by bringing all the pointers together into one location:the index block
Advantages:
indexed allocation supports direct access, without suffering from external fragmentation.
Disadvantages:
we don't know how large the index block should be.Some method will have to be available to deal with the issue