Differenciate between internal and external fragmentation.


Internal and external fragmentation
(1) When memory allocated to a process is slightly larger than the requested memory, space at the end of a partition is unused and wasted. This wasted space within a partition is called as internal fragmentation. When enough total memory space exists to satisfy a request, but it is not contiguous; storage is fragmented into a large number of small holes. This wasted space not allocated to any partition is called external fragmentation.

(2) Internal fragmentation is found in multiple fixed partition schemes where all the partitions are of the same size. That is, physical memory is broken into fixed-sized blocks.
External fragmentation is found in multiple variable partition schemes. Instead of dividing memory into a fixed set of partitions, an operating system can choose to allocate to a process the exact amount of unused memory space it requires.


(3) In multiple fixed partition scheme, the partition table needs to store either the starting address for each process or the number of the partition allocated to each process.
In multiple variable partition scheme, the overhead of managing more data increases. The partition table must store exact starting and ending location of each process and data about which memory locations are free must be maintained.


(4) In multiple fixed partition schemes, size/limit register is set at boot time and contains the partition size. Each time a process is allocated control of CPU, the operating system only needs to reset the relocation register. In multiple variable partition schemes, each time a different process is given control of the CPU, the operating system must reset the size/limit register in addition to the relocation register. The operating system must also make decisions on which partition it should allocate to a process.

(5) Internal fragmentation can be reduced using multiple variable partition method. However, this solution suffers from external fragmentation. External fragmentation can be solved using compaction where the goal is to shuffle the memory contents to place all free memory together in one large block. Another possible solution to the external fragmentation problem is to permit the logical address space of a process to be non contiguous. This solution is achieved by paging and segmentation.

0 comments:

Feel free to contact the admin for any suggestions and help.