You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
This lesson explains virtual memory — what it is, why it is needed, and how it affects computer performance. This is part of OCR J277 Section 1.2.1.
Virtual memory is a section of secondary storage (typically the hard drive or SSD) that is used as an extension of RAM when physical RAM becomes full.
When all available RAM is in use, the operating system moves some data from RAM to a designated area on secondary storage called the page file (Windows) or swap space (Linux/macOS). This frees up RAM for the data that is currently needed.
Modern computers often run many programs simultaneously — a web browser, a word processor, a music player, and background services. Each program requires space in RAM.
If the total memory required by all running programs exceeds the amount of physical RAM, the computer would crash or be unable to open new programs — unless virtual memory is available.
Virtual memory acts as a safety net, allowing the computer to keep running even when RAM is full, by temporarily moving less-used data to secondary storage.
The process of using virtual memory involves swapping data between RAM and secondary storage:
Virtual memory divides memory into fixed-size blocks called pages:
| Concept | Description |
|---|---|
| Page | A fixed-size block of data (typically 4 KB) |
| Page table | A lookup table that maps virtual addresses to physical RAM addresses |
| Page file | The area on secondary storage used for virtual memory |
| Page fault | Occurs when the CPU tries to access a page that is not currently in RAM |
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.