Appearing of the unused regions of different sizes in or between the successive/continuous blocks of memory is known as fragmentation.
There are two types of fragmentation:-
There are two types of fragmentation:-
- Internal fragmentation
- External fragmentation
1. Internal fragmentation
- In this case of static/fixed partitioning, memory is wasted in each partition.
- Wasting of memory within a partition is called internal fragmentation. This is due to a difference in the size of a partition and of the resident process in it.
2. External fragmentation
- External fragmentation refers to the free memory space between the partition, that is enough for a requesting process but it cannot satisfy a request because it is not continuous.
- In the case of dynamic partitioning, the main memory may have such unused free areas of memory scattered between the allocated areas.
- Wasting of memory between partition due to noncontiguous and scattered free memory areas.
In this diagram, free memory space is 180 K but, it cannot satisfy Job 6 requiring 100K.
Handling internal fragmentation
The technique of dynamic partitioning of memory resolves the problem of internal fragmentation.
Handling external fragmentation
one solution to overcome the external fragmentation problem is memory compression and resolution. compulsion means to move the process in the memory in such a way that the scattered hole of unused memory is placed together and becomes continuous. Compaction is done at the execution time of the process.
another possible solution to resolve external fragmentation is to allow non-contiguous memory allocation and does process may be allocated physical memory wherever available
another possible solution to resolve external fragmentation is to allow non-contiguous memory allocation and does process may be allocated physical memory wherever available
Post a Comment
Post a Comment