Internal 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.
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, memory is divided into fixed size blocs.
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.
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
Login/Signup to comment