Why Virtual Memory: Page, Paging, Page Tables

soul of a nameless bard
2 min readJun 5, 2022

Virtual Memory System

The motivation for virtual memory is to allow many programs to run concurrently in secondary storage that are too large to fit completely into main memory at the same time. For example, with enough RAM a user can have a web browser open with multiple tabs, a note-taking application and photo editing program all open at once.

Primary Memory (Random Access Memory (RAM))

  • Physical memory that is the actual RAM of the system attached to the motherboard
  • Size of RAM is limited compared to Disk since it is typically 4GB to 128GB.
  • High speed memory device

Secondary Memory (Disk Storage)

  • Programs are stored in the disk and brought into RAM when they need to be executing so that the CPU can execute program instructions very fast.

X-Bit Program Address Space

  • Range of valid addresses in memory that are available for a program.

Page

A page is a fixed-length contiguous block of virtual that is a single entry in the page table. Pages exist in secondary memory as these fixed sized blocks. This is what we consider to be virtual memory as they are used to store programs when the physical memory…

--

--

soul of a nameless bard

Research and reflections on various topics in systems and software/hardware engineering, design, biology, consciousness, metaphysics and spirituality