← IGCSE Computer Science Paper 1

Why virtual memory is needed

Part of secondary storage used as extra RAM, so a computer can run programs and data bigger than its RAM, with many programs open, without them failing when RAM is full.

Understanding Why virtual memory is needed in IGCSE Computer Science Paper 1

What it does: This shows the limit on RAM size: when the data needed is bigger than RAM, virtual memory is used. With many programs open, RAM can fill up. Without virtual memory, programs may crash or fail to load. RAM chips cannot be added automatically. The real reason is that RAM has limited space, so extra room is needed for programs and data that do not fit.

Common mistakes: When the programs need more than the RAM can hold, the computer uses virtual memory so they can keep running. They are not stopped. The line should be USE virtual_memory. RAM is limited in size, so it needs a fixed amount such as 4. If RAM were unlimited, virtual memory would not be needed.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 314–324) and word search (Modules 304–324).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Why does a computer need virtual memory?
The CPU is too slow to run programs without itRAM is limited in size, so extra space is needed when it fills up
Matches
Virtual memory is needed because RAM is too fast
↓
Virtual memory is needed because RAM is limited in size, not because it is too fast. Virtual memory is actually slower than RAM.
Applying
Meanings
Term
virtual memory
Meaning
Part of secondary storage used as extra RAM, so a computer can run programs and data bigger than its RAM, with many programs open, without them failing when RAM is full.
Practice
IF ramUsed + newProgram > ramSize THEN
Testing
Gaps
IF programsSize ramSize THEN
Check Answer
Spots
3IF needed > RAM_SIZE THEN
4 STOP all programs

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Cosmic Dragon' badge — Orbit Master, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Why does a computer need virtual memory?
A. RAM is limited in size, so extra space is needed when it fills up ✓
B. The CPU is too slow to run programs without it
Virtual memory is needed because RAM has a fixed size. When programs and data are bigger than RAM, spare space on secondary storage is used as extra memory.
2. A student opens a web browser, a music player, a game and a document at the same time. What may happen if RAM becomes full and there is no virtual memory?
A. The computer automatically adds more RAM chips
B. Programs may fail, freeze or refuse to open ✓
With many programs open, RAM can fill up. Without virtual memory, programs may crash or fail to load. RAM chips cannot be added automatically.
3. Where does virtual memory get its extra space from?
A. Secondary storage such as the hard drive or SSD ✓
B. The ROM chip on the motherboard
Virtual memory is a part of secondary storage that is used like extra RAM. ROM is read-only and is not used for this.
4. True or false: The main purpose of virtual memory is to let a computer run programs and data that are bigger than its RAM.
A. True ✓
B. False
This is the core idea. Virtual memory stops programs failing when RAM is full by giving the computer extra space to work with.
5. Which sentence best describes a sub-theme of why virtual memory is needed?
A. Closing one program always makes RAM bigger
B. Many programs open at once can use up all the RAM ✓
Each open program uses some RAM. Many programs at once can use it all. Closing a program frees RAM but does not change its total size.

Match the Pairs

RAM = 4 GB, programs open = 6 GB → The programs need more space than RAM has, so virtual memory is needed to hold the extra
RAM full -> use virtual memory → When RAM runs out of space, the computer uses part of secondary storage as extra RAM instead of failing
RAM is limited in size, so it can only hold so much data at once → IF dataNeeded > ramSize THEN useVirtualMemory
Many programs open at once can use up all of the RAM → totalUsed ← browser + game + music + video
Virtual memory is needed because RAM is too fast → Virtual memory is needed because RAM is limited in size, not because it is too fast. Virtual memory is actually slower than RAM.
When RAM is full, programs must stop working → Without virtual memory programs might fail, but with it the computer uses secondary storage as extra RAM so programs keep running.

Key Term

virtual memory
Part of secondary storage used as extra RAM, so a computer can run programs and data bigger than its RAM, with many programs open, without them failing when RAM is full.

Fill in the Blanks

1. IF programsSize > ramSize THEN useVirtualMemory() ENDIF
Hint: Type the comparison operator that checks whether the programs are bigger than the RAM.
2. IF ramIsFull THEN useVirtualMemory() ENDIF
Hint: Type the name of the procedure that uses part of secondary storage as extra RAM.
3. IF manyProgramsOpen AND ramIsFull THEN useVirtualMemory() ENDIF
Hint: Type the logic operator that needs both conditions to be true.
4. useVirtualMemory() programFails ← FALSE OUTPUT "Programs keep running"
Hint: Type the Boolean value showing that programs do not fail when RAM is full.
5. totalMemory ← ramSize + virtualSize IF programsSize <= totalMemory THEN runPrograms()
Hint: Type the arithmetic operator that adds the virtual memory to the RAM.

Spot the Error

Question 1
A RAM_SIZE <- 8
B needed <- 12
C IF needed > RAM_SIZE THEN
D STOP all programs
E ENDIF
Line D — When the programs need more than the RAM can hold, the computer uses virtual memory so they can keep running. They are not stopped. The line should be USE virtual_memory.
Question 2
A RAM_SIZE <- unlimited
B needed <- 6
C IF needed > RAM_SIZE THEN
D USE virtual_memory
Line A — RAM is limited in size, so it needs a fixed amount such as 4. If RAM were unlimited, virtual memory would not be needed.
Question 3
A programsOpen <- 20
B ramFull <- TRUE
C IF ramFull = FALSE THEN
D USE virtual_memory
Line C — Virtual memory is needed when RAM is full, so the condition must be true when ramFull is TRUE. It should be IF ramFull THEN.
Question 4
A RAM_SIZE <- 8
B total <- 6 + 5
C IF total < RAM_SIZE THEN
D USE virtual_memory
Line C — Virtual memory is needed when the programs and data together are bigger than RAM. The test should use > and not <.
Question 5
A FOR i <- 1 TO 10
B OPEN program[i]
C IF ramFull = TRUE
D USE virtual_memory
E ENDIF
F NEXT i
Line C — An IF statement must end its condition with THEN. The line should be IF ramFull = TRUE THEN.

Student with a class code? Join your class →