As processes are loaded and removed from memory during allocation of memory, the free memory space is broken into little pieces. After sometimes a process cannot allocate memory due to various small leftover space. This occurance is called fragmentation. At this condition there is many small and unused holes scattered throughout memory. Therefore we can say when many of the free blocks are too small to satisfy any request.
Memory fragmentation is of two types :-
i> Internam Fragmentation.
ii> External Fragmentation.
i> Internam Fragmentation :- It is a type of memory fregmentation. Internal fragmentation is the space, which wasted inside of allocated memory blocks because of restriction on the allowed sizes of allocated blocks only. Allocated memory may be slightly larger than the requested memory. This size difference is memory internal to a partition, but never being used.
ii> External Fragmentation :- It is a type of memory fragmentation. External fragmentation exists when there is enough total memory space to satisfy a request but the available spaces are not contiguous.The memory is fragmented into a large number of small holes. If all these small pieces of hole were in one large hole, we might be able to run several more processes. In the worst case, we could have a block of free memory between every two processes.Depending on the total amount of memory storage and the average process size, external fragmentation may be a minor or a major problem.
One solution to the problem of external fragmentation is compaction. The goal is to shuffle the memory contents so as to place all free memory together in one large block or hole. Compaction is not always possible, It is possible only if relocation is dynamic and is done at execution time.The simplest compaction algorithm is to move all processes toward one end of memory and all holes move in the other direction, producing one large hole of available memory.
Comments
Post a Comment
Please comment.