Virtual Memory, Knowledge Organiser

Knowledge Organiser: Virtual Memory

Key Terms

  • Virtual memory: Hard drive space used as an extension of RAM when physical RAM is full
  • Swapping: The process of moving blocks of data between RAM and the hard drive
  • Page file / Swap file: The section of the hard drive reserved for virtual memory
  • Extra: OCR only: Virtual memory is named by OCR. AQA and Edexcel do not name it

Must-Know Facts

  • Virtual memory is stored on the hard drive/SSD, not inside the CPU
  • Virtual memory is much slower than physical RAM (thousands of times slower)
  • Activated automatically by the OS when physical RAM is full
  • Benefit: allows more programs to run than physical RAM alone permits
  • Benefit: prevents out-of-memory crashes
  • Drawback: very slow — hard drive access is far slower than RAM
  • Drawback: excessive use makes the system very slow

Key Concepts

  • How it works: OS moves least-recently-used data from RAM to page file on disk to free up RAM space
  • Swapping process: Data swapped in (disk → RAM) when needed, swapped out (RAM → disk) when not needed
  • Virtual memory is not a replacement for RAM — it is a safety net; adding more physical RAM is always better
  • Speed comparison: RAM ~100 ns; SSD ~0.1 ms; HDD ~10 ms (SSD about 1,000 times and HDD about 100,000 times slower than RAM)

Common Mistakes

  • Saying virtual memory is "extra RAM": Virtual memory uses hard drive/SSD space — it is much slower than real RAM and is only a temporary workaround when RAM is full
  • Thinking virtual memory improves performance: Virtual memory prevents crashes when RAM is full, but it slows the system down significantly — more RAM is always the better solution
  • Forgetting what makes the system so slow: The system spends more time swapping data in and out than actually running programs — caused by having too little RAM for the tasks running
  • Saying the CPU manages virtual memory: It is the operating system (OS) that manages virtual memory, deciding which data to swap to and from the disk

PrepWise is a trading name of A3M Quality Solutions Limited, registered in England and Wales, company number 14959172. Registered office: 202 Stroud Road, Gloucester, GL1 5LA. ICO registration ZC267069.