silicon atlasTHE HARDWARE REFERENCE
العربية
Reference/Memory & storage
Memory & storage

Virtual memory, page tables & TLBs

Translate program addresses into physical pages and enforce permissions.

An address in your process is not simply a location on a RAM chip.
Virtual address

A process-visible location.

LIVE EXPERIMENT

Make a cache miss

Runs on your device
BYTE ADDRESS0Block 0 → Set 0MISS
SET 0tag 0
SET 1·
SET 2·
SET 3·
SET 4·
SET 5·
SET 6·
SET 7·
Accesses1
Hit rate0%
Bytes fetched64
Select any access above, or step through the trace.

A cache fetches a whole line. Locality reuses it; conflicting mappings can evict useful data even before total capacity is exhausted.

What this model includes

One read-only cache, 64-byte lines, LRU replacement, eight total lines, eight-byte elements, 32 accesses. No prefetching or multilevel effects.

FOLLOW THE MECHANISM

What happens inside

1

Translate and protect

A process uses virtual addresses. Page tables map virtual pages onto physical frames and encode permissions. The MMU performs translation, commonly caching recent mappings in a TLB. A TLB miss may cause a hardware page walk; it is not automatically a page fault. Page sizes and table formats depend on the architecture.

2

Resolve a fault

An absent or disallowed mapping traps to the OS. A minor fault may establish a resident mapping or copy-on-write page without storage I/O. A major fault can require fetching data from storage. Huge pages increase translation reach but have allocation and fragmentation tradeoffs. Virtual address space is not equal to committed physical RAM.

PUT IT TO WORK

What this means for your code

Low-level engineer

Manage invalidation, permissions, and address-space identifiers correctly. Device DMA may use a separate IOMMU translation path.

Software developer

Working-set size matters more than reserved address space. Touching newly allocated pages can expose costs hidden by allocation timing alone.

GO TO THE SOURCE

Read the actual specifications

These references supply the underlying contracts and implementation details. The diagrams here are simplified teaching models.

Linux · Page tablesLinux kernel documentation

Keep following the connection

Understood the idea? Keep a note of your progress.