ALL > Computer and Education > courses > university courses > undergraduate courses > Operating System > ZSTU class(2019-2020-1) > student directories > 2017329621139_徐政辉 >
homework9 Version 0
👤 Author: by calmwalteroutlookcom 2019-12-05 05:58:11
describe advantages and disadvantages of each allocation method for disk space
contiguous allocation
contiguous allocation just find a large space enough to store file which have a high performance, that the file is accessed contiguously. But, contiguous allocation will cause external fragmentation. And it's difficult to find a free space to store data. And if we use copy to other disk and then copy back method, it acctually improve the perfomance and reduce the external fragmentation, but this way causes the severe time cost if the disk is large.

linked allocation
linked allocation store the data use in block, each block have a fixed size and have a pointer point to the next block if the block is not large enough to store the data. this acctually solve the external fragment problem. But this will lead to internal fragmentation problem, that if the data is not larg enough, it will not use the whole block and the space will be wasted. another problem is that the pointer will ocupied many more of space of the disk. another problem is that if one pointer have a problem, missed or be changed, destroyed, the remain linked block will loss and maybe cause other data destroyed.
indexed allocation
indexed allocation solve the problem of the security problem of linked allocation, it can store all the pointer in one block so that one pointer loss will not cause the whole data loss, and the perfomance also raised. But this will cause amount of space waste for example if we have a block of size 4kb, and a pointer have a size 4b, then, if we have a small data like 20b which just occupied little space of the block and just need one pointer to point to the stored data. but we need a whole block space to store the pointer. this is a large waste of space. a solution is to make the block small enough. but this will also cause more pointer will be used. space is still wasted.

Please login to reply. Login

Reversion History

Loading...
No reversions found.