Internal Fragmentation

Fragmentation

Users keep loading and unloading processes from the main memory. Usually, processes are stored in blocks in the memory. Sometimes the available memory blocks are not sufficient to store a process that requires contiguous memory spaces. This condition is known as fragmentation. In other words, fragmentation occurs when users dynamically allocate RAM to processes and despite much sufficient space available in the memory, the process cannot be loaded as continuous memory allocation is not possible.

Internal Fragmentation

When a process is assigned to a memory block and if that process is smaller than the memory requested, it creates a free space in the assigned memory block. Then the difference between assigned and requested memory is called internal fragmentation. Usually, internal fragmentation memory is divided into fixed size blocs.

Internal Fragmentation

Learn about external fragmentation and contrast between internal and external fragmentation.

When it occurs?

When the memory assigned to the process is larger than the memory requested by the process.

Example

The memory space is divided into the fixed-sized blocks of 32 bytes. Let us consider that program ‘A’ request for 24 bytes and a fixed-sized block of 32 bytes is assigned to the program. Now, the difference between assigned and requested memory is 8 bytes which is internal fragmentation.

What is the solution?

The memory must be divided into variable sized blocks and assign the best-fit block to the process requesting for the memory. In simple words, internal fragmentation can be reduced effectively by allocating the smallest partition but large enough for the process. However, the problem will not be resolved entirely but can be mitigated to some extent.

Please Login/Signup to comment