When the processes are removed from the memory, the free memory gets broken into small segments. This process occurs after recognizing that the process cannot be allotted to memory blocks because of the smaller memory blocks, and this whole phenomenon is known as fragmentation. There are two types of fragmentation: internal fragmentation and external fragmentation. Let’s analyze the difference between internal fragmentation and external fragmentation.
What is Internal Fragmentation?
Internal fragmentation occurs when the memory is distributed into fixed-sized blocks. If the memory allocated to the process is slightly larger than the memory demanded, then the difference between allocated and demanded memory is known as internal fragmentation.
What is External Fragmentation?
If there is enough space within the memory to meet the memory demand of a process, then in such a situation external fragmentation occurs.
Difference Between Internal and External Fragmentation
S.NO | Internal Fragmentation | External Fragmentation |
1. | If the process is larger than the memory, then internal fragmentation occurs. | If the process is removed, then external fragmentation occurs. |
2. | Fixed-sized memory blocks are designated for internal fragmentation. | Variable-sized memory blocks are designated for external fragmentation. |
3. | Internal fragmentation happens when memory is split into fixed-sized distributions. | External fragmentation happens when memory is split into variable size distributions. |
4. | The best-fit block is the solution to internal fragmentation. | Paging, compaction, and segmentation are solutions to external fragmentation. |
Keep learning and stay tuned to get the latest updates on GATE Exam along with GATE Eligibility Criteria, GATE 2023, GATE Admit Card, GATE Application Form, GATE Syllabus, GATE Cut off, GATE Previous Year Question Paper, and more.
Comments