This topic summary covers Knowledge Organiser: Virtual Memory within Virtual Memory for GCSE Computer Science. Revise Virtual Memory in 3.4 Computer Systems for GCSE Computer Science with 15 exam-style questions and 16 flashcards. This topic appears less often, but it can still be a useful differentiator on mixed-topic papers. It is section 10 of 10 in this topic. Use this topic summary to connect the idea to the wider topic before moving on to questions and flashcards.
Knowledge Organiser: Virtual Memory
Key Terms
- Virtual memory: Hard drive space used as an extension of RAM when physical RAM is full
- Paging: 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
- Thrashing: Severe performance degradation caused by excessive paging in and out of virtual memory
Must-Know Facts
- Virtual memory is stored on the hard drive/SSD, not inside the CPU
- Virtual memory is much slower than physical RAM (100–1000x 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 causes thrashing (system becomes unusable)
Key Concepts
- How it works: OS moves least-recently-used data from RAM to page file on disk to free up RAM space
- Paging 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 (HDD is 100,000x 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 causes thrashing: Thrashing occurs when the system spends more time swapping pages 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 pages to swap to and from the disk
Practice questions for Virtual Memory
What is virtual memory?
Explain how virtual memory works when a user opens more programs than RAM can hold.