OPERATING SYSTEMS ยท 13 MIN READ

Virtual memory in one address space

Virtual memory gives a process addresses it can use while the system maps them to physical memory under controlled rules.

Learning objectives

  • Separate a virtual address from a physical location.
  • Explain pages and address translation at a high level.

Useful illusion, real limits

A process operates in a virtual address space. Hardware and the OS cooperate to translate permitted virtual addresses to physical memory. Page-sized regions and page tables are common mechanisms. This abstraction helps isolate processes and lets the system manage memory flexibly.

Page faults

If a required page is not currently resident or access is not permitted, the processor traps into OS handling. A fault can lead to loading data, or to an error if the access is invalid. Virtual memory is not unlimited fast RAM; moving data from storage is much slower than accessing memory.

Common mistakes and references

  • Virtual memory is not the same thing as a memory leak.
  • Exact page sizes and replacement policies are implementation dependent.