Virtual Memory - Page (memory page|virtual page|chunk)

1 - About

A page is the unit of data processed by paging.

In a virtual memory process, with an MMU, memory addresses go through a translation step prior to each memory access.

This means that memory address 123 might be directed to physical address 82043 at one time, and physical address 20468 another time. As it turns out, the overhead of individually tracking the virtual to physical translations for billions of bytes of memory would be too great.

Instead, the MMU divides RAM into page (known also as memory page or virtual page) which are contiguous sections of memory of a set size that are handled by the MMU as single entities.

Each pages (chunk) can have different states such as:

  • “empty”,
  • “in memory”,
  • or “on disk”.

In Linux, those chunks are typically 4Kb.

3 - Property

3.1 - Shared

Shared page are shared between process. How many processes share is not known. See Virtual Memory - Shared Memory (SHM)

4 - Management

4.1 - Size

A memory page can be both in memory and on disk, and if you sum up everything in memory and everything on disk you will count the page twice.

Shared pages are even more complicated, as only the fact that they are shared is known. How many processes share is not known. If you sum up all the processes memory that is “in RAM” you will count the shared pages multiple times.

4.2 - Swap

4.2.1 - in

see page in

4.2.2 - out

4.2.3 - fault

see Memory - Page Fault Exception

5 - Documentation / Reference

  • Chapter 3, “Protected-Mode Memory Management,” in the Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 3A.

Data Science
Data Analysis
Data Science
Linear Algebra Mathematics

Powered by ComboStrap