RAM (Random Access Memory): volatile — data is lost when power is off. Holds the OS, running programs, and current data. Readable AND writable.
ROM (Read-Only Memory): non-volatile — data is retained without power. Contains the BIOS/firmware — the bootup instructions. Read-only; cannot be overwritten by programs.
BIOS (Basic Input/Output System): stored in ROM; runs POST (Power-On Self Test) and loads the OS
Virtual Memory
Using Secondary Storage as Extra RAM
Virtual memory is a section of secondary storage (e.g. SSD/HDD) used as an extension of RAM when RAM is full. The OS moves inactive pages of data (paging) from RAM to secondary storage to free space.
Benefit: allows more programs to run simultaneously than physical RAM would allow
Drawback: swapping to secondary storage is much slower than RAM — causes noticeable slowdown (thrashing)
The swap file/page file on Windows is the virtual memory space on the drive
The Memory Hierarchy
Speed vs Capacity Trade-off
Registers: fastest, smallest — directly in CPU
Cache (L1/L2/L3): very fast, small — KB to MB
RAM: fast, medium size — GB; volatile
Secondary storage: slowest, largest — TB; non-volatile
Exam Practice
Have a go at this question
Edexcel-style question
Explain what virtual memory is and state one disadvantage of using it.
3 marks
Virtual memory is a section of secondary storage used as overflow when RAM is full [1], allowing more programs to run simultaneously [1]. Disadvantage: secondary storage is much slower than RAM, so the computer slows down significantly when virtual memory is used (thrashing) [1].
Key Takeaways
What to Remember
RAM: volatile, fast, holds current programs/data; ROM: non-volatile, holds BIOS
Virtual memory: secondary storage used as overflow RAM — slow but allows more multitasking