What is Memory Management?
Memory Management is a function of the Operating System that manages primary memory and allocates memory to processes efficiently.
Paging
Paging is a memory management technique in which physical memory is divided into fixed-size blocks called frames and logical memory is divided into pages.
- Eliminates external fragmentation
- Improves memory utilization
- Uses page tables for mapping
Segmentation
Segmentation divides memory into variable-sized logical units called segments such as code, data, and stack.
- Logical division of memory
- Supports modular programming
- Easy sharing and protection
Virtual Memory
Virtual Memory allows a program to execute even when it is larger than the available physical memory.
- Uses secondary storage as extension of RAM
- Supports large applications
- Improves multitasking
Swapping
Swapping is the process of moving a process from main memory to secondary storage and bringing it back when required.
- Frees RAM space
- Allows execution of multiple processes
- Managed by the Operating System
Advantages of Memory Management
- Efficient memory utilization
- Better multitasking
- Reduced fragmentation
- Improved system performance
- Efficient process execution