Os Memory Management Questions Medium
Internal fragmentation refers to the wasted memory within a single allocated memory block or partition. It occurs when the allocated memory is larger than the actual size of the process or data being stored. This wasted memory cannot be used by other processes or data, resulting in inefficient memory utilization.
External fragmentation, on the other hand, occurs when free memory blocks or partitions are scattered throughout the memory space, making it difficult to allocate contiguous memory blocks for larger processes or data. It happens when the total free memory is sufficient to fulfill a request, but the available memory is divided into small, non-contiguous blocks. As a result, even though there is enough free memory, it cannot be utilized efficiently due to the scattered nature of the available blocks.
In summary, internal fragmentation refers to wasted memory within a single allocated block, while external fragmentation refers to the scattered distribution of free memory blocks throughout the memory space. Both types of fragmentation can lead to inefficient memory utilization and can be addressed through various memory management techniques such as compaction, paging, or segmentation.