ALL > Computer and Education > courses > university courses > undergraduate courses > Operating System > ZSTU class(2019-2020-1) > student directories > >
homework 9 Version 0
👤 Author: by minhaynqqcom 2019-12-06 03:09:01

describe advantages and disadvantages of each allocation method for disk space



  1. Contiguous Allocation


Advantages:

  • Both the Sequential and Direct Accesses are supported by this. For direct access, the address of the kth block of the file which starts at block b can easily be obtained as (b+k).

  • This is extremely fast since the number of seeks are minimal because of contiguous allocation of file blocks.


Disadvantages:

  • This method suffers from both internal and external fragmentation. This makes it inefficient in terms of memory utilization.

  • Increasing file size is difficult because it depends on the availability of contiguous memory at a particular instance.



  1. Linked List Allocation


Advantages:

  • This is very flexible in terms of file size. File size can be increased easily since the system does not have to look for a contiguous chunk of memory.

  • This method does not suffer from external fragmentation. This makes it relatively better in terms of memory utilization.


Disadvantages:

  • Because the file blocks are distributed randomly on the disk, a large number of seeks are needed to access every block individually. This makes linked allocation slower.

  • It does not support random or direct access. We can not directly access the blocks of a file. A block k of a file can be accessed by traversing k blocks sequentially (sequential access ) from the starting block of the file via block pointers.

  • Pointers required in the linked allocation incur some extra overhead.



  1. Indexed Allocation


Advantages:

  • This supports direct access to the blocks occupied by the file and therefore provides fast access to the file blocks.

  • It overcomes the problem of external fragmentation.


Disadvantages:

  • The pointer overhead for indexed allocation is greater than linked allocation.

  • For very small files, say files that expand only 2-3 blocks, the indexed allocation would keep one entire block (index block) for the pointers which is inefficient in terms of memory utilization. However, in linked allocation we lose the space of only 1 pointer per block.

Please login to reply. Login

Reversion History

Loading...
No reversions found.