Whenever a procedure is invited or eliminated from the physical memory block, it creates a small hole in memory space which is called fragment. Because of fragmentation, the system stops working in allocating the contiguous memory space to a process even though it have actually the asked for amount of storage but, in a non-contiguous manner. The fragmentation is additional classified right into two categories Internal and also External Fragmentation.

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

Both the internal and also external group affects data accessing rate of the system. They have a an easy difference in between them i.e. Internal fragmentation occurs once fixed sized memory blocks room allocated come the procedure without concerning about the dimension of the process, and External fragmentation occurs when the processes are allocated memory dynamically.

Let us move further and discuss the differences, reasons, services behind internal and external fragmentation with the aid of compare chart displayed below.

Content: interior Vs external Fragmentation

Comparison Chart

Basis because that Comparison interior FragmentationExternal Fragmentation
BasicIt occurs when fixed sized memory blocks are allocated to the processes.It occurs once variable dimension memory an are are allocated to the processes dynamically.
OccurrenceWhen the storage assigned come the process is slightly larger than the memory asked for by the process this creates free space in the allocated block causing inner fragmentation.When the procedure is eliminated from the memory, it create the cost-free space in the storage causing exterior fragmentation.
SolutionThe memory need to be partitioned into variable sized blocks and assign the ideal fit block to the process.Compaction, paging and segmentation.

Definition of interior Fragmentation

Internal fragmentation occurs when the storage is divided into fixed size blocks. Whenever a process request for the memory, the fixed sized block is allocated to the process. In instance the memory assigned to the process is somewhat bigger than the memory requested, then the difference in between assigned and requested memory is the Internal fragmentation.

This leftover an are inside the fixed sized block have the right to not it is in allocated to any process as it would not be sufficient to meet the inquiry of storage by the process. Let us understand inner fragmentation v the assist of one example. The memory room is partitioned right into the fixed-sized block of 18,464 bytes. Let united state say a procedure request because that 18,460 bytes and partitioned fixed-sized block of 18,464 bytes is allocated come the process. The an outcome is 4 bytes of 18,464 bytes remained empty i m sorry is the inner fragmentation.

The overhead of maintaining track the the internals hole developed due to inner fragmentation is substantially an ext than the number of internal holes. The problem of internal fragmentation deserve to be solved by partitioning the memory into the variable size block and also assign the best-sized block come a procedure requesting because that the memory. Still, it will not entirely eliminate the difficulty of inner fragmentation but will reduce it to some extent.

Definition of external Fragmentation

External fragmentation occurs as soon as there is a sufficient amount of room in the storage to meet the storage request of a process. However the process’s memory request can not be satisfied together the memory available is in a non-contiguous manner. One of two people you apply first-fit or best-fit storage allocation strategy the will cause external fragmentation.

When a procedure is loaded and removed indigenous the storage the free space creates the feet in the storage space, and there are plenty of such feet in the memory space, this is called External fragmentation. Return the first fit and best right can influence the lot of external fragmentation, it deserve to not be completely eliminated. Compaction may be the solution for outside fragmentation.

Compaction algorithm shuffles every memory components to one side and frees one large block of memory. But compaction algorithm is expensive. Over there is an alternate solution come solve outside fragmentation worry which will enable a process to get physical storage in a non-contiguous manner. The approaches to accomplish this solution are paging and also segmentation.

Key Differences between Internal and also External fragmentation

The basic reason behind the events of internal and also external fragmentation is that internal fragmentation occurs when memory is partitioned into fixed-sized blocks whereas outside fragmentation occurs once memory is partitioned right into variable dimension blocks.When the memory block allotted come the procedure comes out to it is in slightly larger than asked for memory, then the complimentary space left in the allotted memory block reasons internal fragmentation. ~ above the other hands, when the process is removed from the storage it creates totally free space leading to a feet in the storage which is referred to as external fragmentation.The difficulty of interior fragmentation deserve to be solved by partitioning the memory into variable size blocks and assign the best fit block come the requesting process. However, the solution for exterior fragmentation is compaction, but it is expensive come implement, so the processes must be enabled to gain physical storage in a non-contiguous manner, to accomplish this the method of paging and also segmentation is introduced.

See more: At 135Lbs, What Size Does A 135 Lb Woman Wear, Pin On Cool Stuff


The problem of internal fragmentation can be reduced, but it can not be entirely eliminated. The paging and also segmentation assist in utilising the space freed because of external fragmentation by allowing a process to occupy the storage in a non-contiguous manner.