Learn in your language
Skip to content
IGCSE · Cambridge (CIE) · 0265

Primary, secondary and virtual memory

Compare RAM, ROM, cache, registers and secondary storage, then explain how virtual memory uses storage when RAM is insufficient.

Section Component 1 · Computer Systems and Logic

Cambridge IGCSE Computer Science 0265 · 2029 syllabus · Version 1 · 2

Mapped to the Cambridge IGCSE Computer Science 0265 syllabus for exams in 2029. These original explanations and self-checks are independent study support, not Cambridge papers, official marks or grades. Practical programming is taught with worked code and trace tasks; an executable Python workspace and timed digital-exam simulation are not yet available.

Before you begin

  • Use the 2029 syllabus for this course. Cambridge specifies Python 3.10 or higher for programming and digital exams for both components. The syllabus currently identifies this route for 2029 only; confirm later-year availability with Cambridge and your school.

Work on paper. Try each question before revealing help, and explain why your method works.

Quick readiness check

Before primary, secondary and virtual memory, which statement is the safest starting point?

What you will learn

  • Explain the purposes of primary storage
  • Compare RAM and ROM and primary with secondary storage
  • Describe magnetic, solid-state and virtual memory

Primary memory is close to processing

RAM holds programs and data currently in use. It is volatile, so its contents are lost when power is removed. ROM is non-volatile and can store essential startup instructions. Cache keeps frequently used data or instructions close to the CPU; registers hold tiny amounts of data directly inside the processor.

Secondary storage retains files without power and provides larger long-term capacity than primary memory. In magnetic storage, a read/write head detects or changes magnetic patterns on rotating platters. Solid-state storage reads and writes charge states in flash cells through an electronic controller; it has no moving mechanical parts.

Virtual memory extends working space

When RAM is full, the operating system can move inactive pages of memory to a backing store and bring them back when needed. Paging divides memory into fixed-size units; segmentation groups it into logical regions such as code, data and stack. The operating system maps these parts so a process can run even when only some parts are resident in RAM.

Secondary storage is slower than RAM, so heavy use of virtual memory can make a computer feel sluggish. It is useful because it helps prevent programs from failing when working memory is limited, but it does not turn storage into equally fast physical RAM.

Pause and explain

Which habit best checks your understanding of primary, secondary and virtual memory?

Put the idea to work

Worked example

A computer runs low on RAM and moves an inactive memory page to storage. Explain what happens next when that page is needed.

Show the worked solution
  1. The operating system has kept the page in a backing store.
  2. When the program needs it, the page is loaded back into RAM.
  3. A different page may need to be moved out if RAM is still full.

Answer The page is swapped back into RAM, possibly replacing another page; this access is slower than RAM.

Try a topic test

Choose Easy, Normal or Difficult. Save your answers and open worked review after finishing.

Test this topic →

From guided practice to a new situation

Write your answer and reasoning first. Use a hint only if you are stuck. The model solution is for self-checking; your written work is not automatically marked.

1 · Guided

A laptop must keep startup instructions when switched off and hold a document currently being edited. Name a suitable storage type for each and explain.

Give me a hint

Separate permanent startup data from active working data.

Compare my reasoning
  1. ROM is non-volatile and can retain startup instructions.
  2. RAM holds the active document and running programs.
  3. RAM is volatile, so the document should be saved to secondary storage to retain it.

ROM for startup instructions; RAM for active work, saved to secondary storage for persistence.

Look for these in your work

  • ROM purpose
  • RAM purpose
  • Persistence explained
2 · Independent

Compare a magnetic hard disk and a solid-state drive for speed, moving parts and durability in a portable device.

Give me a hint

Compare the physical storage mechanism and connect it to likely consequences.

Compare my reasoning
  1. A hard disk uses rotating magnetic platters and moving read/write parts.
  2. An SSD uses electronic cells with no moving parts and is typically faster for random access.
  3. The SSD is generally more resistant to movement shocks, while capacity and cost should also be considered for a real purchase.

An SSD is usually faster and less vulnerable to shock; a magnetic disk uses moving platters and can offer different cost/capacity trade-offs.

Look for these in your work

  • Mechanisms distinguished
  • Performance linked
  • Trade-offs acknowledged
3 · Transfer

A student opens many large applications and the computer starts swapping memory pages to storage. Explain why it slows down and suggest one relevant improvement.

Give me a hint

Connect page movement to the speed difference between RAM and backing storage.

Compare my reasoning
  1. Inactive pages are written to storage and must be read back when needed.
  2. Storage access is slower than RAM, so frequent swapping creates delays.
  3. Adding more RAM can reduce the need to swap, if the hardware supports it.

Frequent virtual-memory swapping is slower than RAM; more RAM can reduce the pressure.

Look for these in your work

  • Page movement explained
  • Speed impact linked
  • Practical improvement

Common mistakes

  • Calling ROM volatile because it is read by the CPU.
  • Treating secondary storage as faster than RAM.
  • Saying virtual memory increases physical RAM capacity.
Recall without your notes

What can you explain now?

Which loses its contents when power is removed: RAM or ROM?

Compare with the explanation

RAM

RAM is volatile; ROM is non-volatile.

After trying it yourself, choose your next review. This is your self-assessment.

Your review choice appears on Today. Sign in to sync it across devices.

Make it stick

How do primary memory, secondary storage and virtual memory support different parts of a computer’s work?

If you needed the solution, close it and solve the problem again from a blank page. A correct answer is stronger when you can explain the reason for each step.

Keep learning Computer Science

Course scope and assessment

All 11 syllabus topics link to 33 original lessons. Each lesson includes worked teaching, a check with explanation and guided, independent and application practice. This is mapped teaching, not evidence of exam readiness, teacher approval or a Cambridge grade. Cambridge specifies two externally assessed digital exams; StudyForA does not yet provide full timed digital-paper simulations or an executable Python 3.10+ workspace for practical programming. The currently published syllabus is for 2029; later-year coverage is not claimed.

StudyForA · Learn with understanding

Original teaching content and links to official sources. Check your exam year and qualification before using a resource.