ALL > Computer and Education > courses > university courses > undergraduate courses > Operating System > ZSTU class(2019-2020-1) > student directories >
homework9 Version 0
👤 Author: by 15988816214163com 2019-12-24 01:54:50
1) continuous distribution
Each file is assigned a set of adjacent extents. The recording order in the logical file is the same as that of the disk block occupied by the file in the memory.
Advantages: easy to access in sequence and fast to read and write.
Disadvantage: external fragmentation will occur. It can be made up by compact method, but it needs extra space and takes more time than compact memory. When creating files, the file size should be given; the utilization of storage space is not high, which is not conducive to the dynamic increase and modification of files; it is suitable for files with less sequential access, and the continuous file structure is still preserved in popular UNIX systems. For swap area

2) link assignment
Each file can be assigned a set of non adjacent disk blocks. Set the link pointer to link multiple discrete disk blocks belonging to the same file into a linked list. The resulting file is called a linked file. There will be link costs.
Advantages: discrete allocation, elimination of external fragmentation, and improvement of utilization; at the same time, it is applicable to the dynamic growth of files; easy to modify.
Disadvantages: can only read along the disk block, low reliability.

3) index allocation
Disadvantages of links
Time cost of sequential retrieval: cannot support efficient disk block direct access. To access a file directly, you still need to look up many disk block numbers in fat in sequence.
Space cost of link information: fat needs a large amount of memory. When the disk capacity is large, fat may take up more than a few MB of memory space. This is intolerable
Improvement: when the system is running, only part of the files are involved, fat table does not need to be transferred into memory; each file builds an index table (physical disk block index) separately to record all the disk block numbers allocated to it; when the file is established, a certain amount of external memory space is allocated to store the file disk block index table information.

Index format is suitable for large files
Small and medium-sized files only need a few links. If index allocation is used, it is not applicable to store a small amount of index information in a disk block.

Please login to reply. Login

Reversion History

Loading...
No reversions found.