Semicolony ELI5 · comic

Virtual memory.

Giving every program its own private, tidy address space, while the OS quietly maps it onto the real, messy RAM.

  1. Apartment 1, all mine.
    program A program B 012012 each starts at zero
    1

    Every program gets its own tidy address space, starting at zero, as if it owned the machine.

  2. Send it to flat 42.
    read flat 42 a virtual address
    2

    When it reads an address, that’s a make-believe one — a flat number, not a real location.

  3. flat 42 PAGE TABLE → RAM 0x9C real RAM
    3

    The page table is the post office: it looks up where that page really sits in RAM.

  4. No address for next door.
    program A program B no name for next door
    4

    Each program has its own mapping, so one literally can’t name another’s memory.

  5. One moment, retrieving…
    RAM missing disk page fault
    5

    If the page was parked on disk, a page fault fetches it back before work continues.

  6. Why is everything frozen?
    RAM disk thrashing — it crawls
    6

    Too much of that and pages ping-pong to slow disk — thrashing grinds it to a crawl.

Each program uses simple apartment numbers; the OS post office knows the real address behind every one.
Semicolony semicolony.dev/eli5/virtual-memory/comic
← All ELI5 explainers