Virtual Memory
Virtual Memory
Memory
Sumit Jaiswal
Introduction
• One of the most important aspects of an operating system is the Virtual Memory Management
system.
• Virtual Memory (VM) allows an operating system to perform many of its advanced functions,
such as process isolation, file caching, and swapping.
• To properly understand how a Virtual Memory Manager does its job, it helps to understand what
components comprise a VM. While the low level view of a VM are overwhelming for most, a
high level view is necessary to understand how a VM works and how it can be optimized for
workloads.
MMU
from the algorithm this subsystem uses to maintain it free page Buddy
Allocat
-or
• The Slab Allocator provides a more usable front end to the Buddy Allocator for
those sections of the kernel which require memory in sizes that are more
flexible than the standard 4 KB page. The Slab Allocator allows other kernel
components to create caches of memory objects of a given size. The Slab
Allocator is responsible for placing as many of the cache's objects on a page as
possible and monitoring which objects are free and which are allocated. When
allocations are requested and no more are available, the Slab Allocator requests
more pages from the Buddy Allocator to satisfy the request. This allows kernel
components to use memory in a much simpler way. This way components
which make use of many small portions of memory are not required to
individually implement memory management code so that too many pages are
not wasted. The Slab Allocator may only allocate from the DMA and NORMAL
zones.