ALL > Computer and Education > courses > university courses > undergraduate courses > Operating System > ZSTU class(2019-2020-1) > student directories > 2016329600010 丁明子晗 >
homework 9 Version 0
👤 Author: by 1057641360qqcom 2019-12-26 05:05:39
Describe the advantages and disadvantages of each disk space allocation method.

1 Continuous allocation
Continuous allocation means that all space of a file is allocated in contiguous memory and has a fixed base size.

There are two advantages. First, it's easy to implement. Second, it can support random access, and it's easy to go to the next part of the file.

There are two disadvantages. First, it is difficult to find free space for new files, which is also known as a dynamic storage allocation problem. Because after deleting some files from the entire space, all that remains is free space with different sizes. Another problem is to determine the space of the new file. We did not know the size of the file before. This can waste a lot of memory.

2 Link assignment
Linked allocation means that a file is stored in separate locations in memory by multiple independent blocks. It has a header block, a body block, and an end block, and each block of the expected end block has a pointer to the next block. For each file, the start and end blocks are stored in the directory.

The advantage is that it addresses all the disadvantages of continuous allocation.

The disadvantage is that it only supports serial access. Another problem is that pointers can take up some memory. The third problem is that the method is very unreliable, because pointers may be lost.

3 Index allocation
Index allocation is an improvement over link allocation, which collects each pointer to a file and lists them together in order.

The advantage is that it eliminates the problem of rupture.

The disadvantage is that it cannot support random access. The size of the file is determined by the size of the index block, and multiple methods (such as multilevel indexing) are required to solve this problem.

Please login to reply. Login

Reversion History

Loading...
No reversions found.