External Fragmentation
External Fragmentation
Usually, external fragmentation occurs in the case of dynamic or variable sized partitions. Although total space available in the memory is sufficient to execute the process; however, this memory space is not contiguous, which restricts process execution.Fragmentation
Whenever a process is loaded or removed from the physical memory block, it creates free spaces in the memory, which are commonly known as fragments. These small fragments in the memory cannot be allocated in a contiguous manner to any process as these spaces are not continuous. Consequently, the memory is wasted and cannot be used by another process. This problem is called fragmentation.
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, memory is divided into fixed size blocs.
When it occurs?
When portions of allocated memory are too small to hold any process.
Example
The RAM has a total of 10 kb free space , but it is not contiguous, or is fragmented. If a process with 10 kb size wants to loads on the RAM, then it cannot load because space is not contiguously free.
What is the solution?
The solution for external fragmentation is compaction or shuffle memory contents. In this techniques all the memory contents of memory are shuffled and all free memory is put together in one large block. In order to make compaction feasible, relocation should be dynamic. Also, external fragmentation can be resolved by paging or segmentation mechanisms, which will allow a process to acquire physical memory in a non-contiguous manner.
Prime Course Trailer
Related Banners
Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription
Get over 200+ course One Subscription
Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others