CREATE OWN LIBRARY

Dynamic Partition: 

 

In the dynamic partition technique, memory allocated dynamically for each process, unlike a fixed partition. 

 

We know in fixed partition technique there is a major disadvantage is an internal fragmentation

And here due to internal fragmentation also external fragmentation occurred. 

 

Initially, the whole memory is free not divided with a fixed partition and as per the requirement of the current process, it can dynamically allocated memory.

 

 

So, at dynamic partition, it is clear that internal fragmentation never be happened.

 

But in dynamic partition external fragmentation  can be occurred

 

For example:

# Let’s assume that process P1 and P3 with size 1 MB and 4MB is finished, so, they are swap out and 2 MB and 4 MB memory is free. 

 

 

At this time a new process P5 with size 5MB try to enter into the main memory. But consecutively 5MB memory space is not free. 

Though a total of 5MB free space is available in memory it is not serially available so, process P5 is not possible to allocate into memory at this moment. 

 

Still, we have available free space at the memory but we cannot be allocated the process because it is not a consecutive way, this is called external fragmentation.

 

# So, the main reason for external fragmentation is contiguous memory allocation, not internal fragmentation.

 

To avoid contiguous memory allocation we use the paging technique.

 

Advantages of Dynamic Allocation:

1. Degree of multi-programming is dynamic, not fixed.

2. No Internal fragmentation. 

3. Size of the process is not limited by the size of a partition.

 

Disadvantages of Dynamic Allocation:

1. External fragmentation      

2. Allocation and de-allocation of memory are complex.