Internal Fragmentation
A bigger chunk of RAM is set aside for the process. Some memory is left unused because it cannot be utilised by another function. By properly allocating the smallest division that is yet large enough for the process, internal fragmentation can be reduced.
When there is a mismatch between the quantity of memory needed and the amount of memory that is actually available, internal fragmentation becomes a problem.
When paging is used, internal fragmentation occurs.
When memory allocations are made but chunk sizes are fixed, internal fragmentation follows.
Internal process fragmentation occurs when a process consumes less memory or uses more than the allocated memory block can hold.
External Fragmentation
Although the total RAM is large enough to accommodate a process or handle a request, we are unable to use it since it is not contiguous. To lessen external fragmentation, we can condense or shuffle memory to free up a substantial amount of space. For compaction to be useful, relocation must be dynamic.
Internal fragmentation is largely controlled via Best Fit Block Search.
External fragmentation is fixed through compaction.
When the size of the allotted memory blocks fluctuates, external fragmentation occurs.
When segmentation is used, external fragmentation happens.
When small, non-contiguous memory blocks cannot be assigned to any process, external fragmentation results.
An affected process is deleted from the main memory as a result of external fragmentation.