When the memory resources are scarce. We use compaction.
What is meant by the term 'compaction'
Segmentation involves dividing memory into variable-sized partitions to allocate memory dynamically, while compaction rearranges memory to reduce fragmentation by moving allocated memory blocks closer together. Segmentation deals with memory allocation, while compaction improves memory utilization.
As a memory pool is allocated from, over time the pool will become fragmented. Some objects from the pool will be allocated surrounded by objects that are not, in seemingly random order. Memory compaction is the process of moving allocated objects together, and leaving empty space together. Consider a system with 3 pages and about 50% of their objects are allocated. By compacting all the living objects into the first two pages, leaving the third page completely empty. This empty page can then be ignored during future mark/sweep phases since it is known to be empty of living objects, or it can be released and returned to the operating system.
The process of moving all marked nodes to one end of memory and all available memory to other end is called compaction. Algorithm which performs compaction is called compacting algorithm.
External fragmentation is reduced by compaction. Compaction moves memory around until it is all placed together in one big block.
Virtual memory management assist in the process of multitasking by providing extra memory when a computer has used up all its RAM. Virtual memory is however slower than RAM.
teri maa ki chut
function of memory management
You can compress your files into a spare harddrive to keep your memory ok
The purpose of a page frame in computer memory management is to provide a fixed-size block of physical memory that can be used to store a page of data from virtual memory. This helps in efficiently managing memory resources and allows for the mapping of virtual memory addresses to physical memory locations.
MS-DOS does not have built-in memory management.