Download the BYJU'S Exam Prep App for free GATE/ESE preparation videos & tests - Download the BYJU'S Exam Prep App for free GATE/ESE preparation videos & tests -

External Fragmentation in OS

The total memory space is sufficient to satisfy a given request or reside any process in it. Yet it isn’t contiguous; thus, it can’t be used. It is what leads to external fragmentation, and it can be reduced using compaction or by shuffling the memory contents in order to place together all the free memory into a single large block. In order to make the compaction feasible, relocation must be dynamic.

In this article, we will look more into the External Fragmentation in OS according to the GATE Syllabus for (Computer Science Engineering) CSE. We will read ahead to find out more about it.

Table of Contents

What is External Fragmentation?

External fragmentation occurs whenever a method of dynamic memory allocation happens to allocate some memory and leave a small amount of unusable memory. The total quantity of the memory available is reduced substantially in case there’s too much external fragmentation. Now, there’s enough memory space in order to complete a request, and it is not contiguous. Thus, it is known as external fragmentation.

External Fragmentation

External fragmentation occurs whenever the used storage gets differentiated into certain smaller lots and punctuated using assigned memory space. It’s actually a weak point of various storage allocation methodologies when they can’t actually schedule memory utilised by systems. As a consequence, while the unused storage is available to us, it is inaccessible essentially since it’s split separately into fragments that might be too limited to meet the requirements of the software. The word “external” is derived here from the matter that the inaccessible space gets stored outside of the assigned regions.

Let us consider a scenario in which the given system assigns 3 consecutive memory blocks and then relieves the middle one. The unused allocation in the storage can be used by the memory allocator for future assignments. Now, fortunately, in case the storage that’s to be reserved is more accommodating in size than the available region, it won’t use this very component.

External fragmentation often exists in the case of data files whenever several files are formed of various sizes, then resized, and discarded. In case a broken document of several small chunks gets removed, the influence is much worse because this would retain equally small space sections (free).


As you can see in the illustration mentioned below, there is sufficient memory space (55 KB) in order to execute process 07 (mandated 50 KB). But here, the storage (fragment) isn’t adjacent. Thus, to use the empty room to run a procedure, one can use paging, compression, or segmentation strategies.


Let’s take another example of external fragmentation. As you can see in the diagram given below, there is sufficient space (of 50 KB) to run a process 05 (requirement of 45 KB), but the memory here is not contiguous. Thus, one can use compaction, segmentation, and paging in order to use the free space for the execution of a process.


Avoiding External Fragmentation

The problem of external fragmentation occurs whenever we allocate the RAM to process continuously. It can be done in segmentation and paging, in which the memory is allocated non-contiguously to the processes. And as a result, in case we happen to remove this very condition, then the external fragmentation may ultimately be decreased.

Another method that can be used for the removal of external fragmentation is compaction. External fragmentation can be decreased whenever the dynamic partition is utilised for the process of memory allocation. It can be done by the combination of all the free memory into one single large block. This larger block of memory can be used for the allocation of space on the basis of the new process requirements. There’s another name for this very method, defragmentation.

Keep learning and stay tuned to get the latest updates on GATE Exam along with GATE Eligibility Criteria, GATE 2023, GATE Admit Card, GATE Syllabus, GATE Previous Year Question Paper, and more.

Also Explore,