In: Computer Science
Difference between Internal fragmentation and External fragmentation :
1. In internal fragmentation fixed-sized blocks of memory is given to a process. Whereas, in external fragmentation, variable-sized memory blocks is allocated to a process.
2. Internal fragmentation occured when the memory that is assigned to a process is slightly larger than the memory requested by the process , and hence it created some free space. Whereas, External fragmentation occured when a process is removed from the memory, and then it creates some free space in the memory.
3.The solution of internal fragmentation is best-fit block. Whereas, the solution of External fragmentation is Compaction, paging and segmentation.
The Use of virtual memory improve system utilization :
Virtual memory is a memory management technique where secondary memory can be used and can be addressed as a part of main memory.Virtual memory is essential for improving system utilization and system performance, it performs multitasking, using large programs .
Virtual Memory improves utilization by following techniques :
1. Demand Paging :
Demand Paging is the process of loading the page into main memory only when the process needs that page ( On Demand).
As the virtual memory is large as compared to main memory , then More efficient use of main memory can be done hence, no limit on degree of multiprogramming is there. Hence, it increases system utilization.
2. Swapping :
Swapping is a memory management scheme in which any process can be swapped temporarily from main memory into the virtual memory , so that the Main memory at that time , can be used for other process.
Swapping affects the performance of the system, as it helps to run larger programs and more than one process at a time . Hence, It is used to improve main memory utilization.