A lesson from the Computer Memory module of the bootcamp. About a 13 minute read.
Every process believes it owns a vast, private, contiguous memory, and not one of them does. Virtual memory translates the addresses a program uses into physical ones, one page at a time, and that one layer of indirection buys isolation, sharing, lazy loading, and the ability to use disk as overflow.
The addresses your program uses are VIRTUAL. Each process has its own private address space, laid out the same tidy way every time. On every memory access, the hardware translates the virtual address into a PHYSICAL one, the real location in DRAM. The operating system decides that mapping, one PAGE at a time, usually 4 kilobytes, and it can put any page in any free frame of physical memory, or nowhere at all until it is needed. That one layer of indirection is what lets dozens of programs share a machine without being able to see or damage each other. And it is an old idea: the Atlas computer at the University of Manchester had it in 1962, and essentially every general-purpose machine has had it since.
The rest of this lesson continues with 7 further sections. See the full curriculum.
Browse all 576 practice puzzles