Solution to Problem of External Fragmentation

Q5. What is the Solution to the Problem of External Fragmentation?

Ans. Solution to the problem of external fragmentation is compaction. The process is to shuffle the memory contents so that all free memory is placed together in one large block. It is only possible if relocation is dynamic and done only at run time.

The simplest compaction algorithm is to move all processes towards one end of the memory, all holes move in one direction, producing one large hole of available memory.

Compaction

Figure: Compaction

Another solution to external fragmentation is to permit logical address space of the processes to be noncontiguous. The process is allocated with the available physical memory and whenever the later is available, it is assigned to the process. This solution is achieved through two complementary techniques:

Paging and Segmentation.

One thought on “Solution to Problem of External Fragmentation

  • December 4, 2017 at 6:50 pm
    Permalink

    You should have added segmentation and paging as well and explained it too.
    Thank you

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: