In this tutorial, we will certainly be extending the difference between Internal and also External Fragmentation in operating System.

You are watching: Explain the difference between internal and external fragmentation

Let us an initial understand what is fragmentation and the causes of fragmentation.

Fragmentation in OS

In the storage system of the computer, as procedures are loaded an are is allocated come them and also this room is separated on the basis of fixed partitioning (where the size of partitions is fixed prior to any procedure gets loaded into the memory) and dynamic partitioning(where the dimension of partitions is made decision at the operation time and it is mainly according come the dimension of the process).

Likewise, processes are loaded and also then removed from the memory as result of which the cost-free space in the storage gets damaged down into smaller pieces. This largely creates small non utilized fragmentised memory spaces that are so small due to which regular processes have the right to not fit into them.

The trouble due come which memory room is not getting utilized at all is typically known together Fragmentation in the operating system.

Fragmentation is further split into 2 types:


Internal Fragmentation in OS

Internal Fragmentation is a problem that occurs as soon as the process is allocated to a memory block whose size is an ext than the dimension of that procedure and due to which some component of the storage is left unused. For this reason the space wasted within the allocated storage block is because of the restriction on the permitted sizes the allocated blocks.


The over figure reflects the interior Fragmentation in operating System

In the above diagram, the difference in between memory allocated and required room or memory by the process is called internal fragmentation.

External Fragmentation in OS

When the memory space in the mechanism can quickly satisfy the necessity of the processes, yet this available memory room is non-contiguous, therefore it can’t be made use of further. Climate this difficulty is referred to as External Fragmentation.


The over Figure reflects the exterior Fragmentation in operating System

Suppose, we want to allocate memory to a process of size 8 MB and also as In the over diagram, we deserve to see that, over there is enough space that is 9 MB to operation a process of size 8MB but the memory that is pieces are not contiguous.

There is a systems for the trouble of exterior Fragmentation and it is Compaction. The main goal is to shuffle the memory components so as to place every the totally free memory with each other in one huge block.

Also, Compaction is not constantly possible. Expect if relocation is static and also is excellent at the fill time then in that instance compaction can not be done. Since compaction is only feasible if the relocation is dynamic and is done at the execution time.

Difference between Internal and External Fragmentation

Now let us cover the significant difference between Internal Fragmentation and External Fragmentation.

Internal FragmentationExternal Fragmentation
Internal Fragmentation occurs when the memory blocks that fixed-size are allocated to the processes.External Fragmentation occurs when the memory blocks of variable-size room allocated to the procedures dynamically.
This kind of fragmentation mostly occurs as soon as the fixed dimension partition is assigned come a procedure whose size is much less than the dimension of the partition because of which the remainder of the space in the partition i do not care unusable.When the memory an are in the device can conveniently satisfy the need of the processes, yet this available memory an are is non-contiguous, so it can not be used further.
The difference between allocated memory and memory compelled by a procedure is dubbed Internal fragmentation.Unused storage spaces between the non-contiguous memory pieces that room too little to offer a brand-new process are called External fragmentation.
It largely refers to the unused space in the partition that resides in the allocated region; as suggested by the name.It mostly refers to the unused blocks of the storage that are not contiguous and hence space unable to meet the requirements of the process.
Best-fit block can be provided to overcome the difficulty of internal fragmentation.Compaction, segmentation, and also paging have the right to be provided to overcome the trouble of exterior fragmentation.
Paging ill from inner fragmentation.

See more: Stream Rawr That Means I Love You, In Dinosaur, Rawr Means I Love You In Dinosaur Sign

First-fit and best-fit endure from outside fragmentation.