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 single layer of indirection buys isolation, sharing, lazy loading, and the ability to treat 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, and 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 it has been in essentially every general-purpose machine since.
The rest of this lesson continues with 7 further sections. See the full curriculum.
Browse all 546 practice puzzles