GCSE · Computer Science · OCR · Spec J277

Cache (CPU cache)

A chef keeps the salt they use every day right by the hob, not at the shop. Your CPU does the same trick. It is called cache.

Computer Science · Cache

Follow the CPU's requests

Tiny, made-up caches, not to scale. ▶ shows where the CPU is looking. ✔ shows where it finds the item.

Before each press of Next, predict: where will the CPU look now, and what will change?

Phase: Start · no request yet

CPU wants

nothing yet

Level one

A, B

Level two

C, D, E

Level three

F, G, H, I

RAM

—

Output

 

Step 1: Here are three tiny, made-up caches: level one holds two items, level two three, level three four. The sizes are invented and not to scale. They only show that level one holds the least and level three the most.

1 / 10

Press Next › to move one step. Each step is one move the CPU makes.

Step 1 of 10: Here are three tiny, made-up caches: level one holds two items, level two three, level three four. The sizes are invented and not to scale. They only show that level one holds the least and level three the most..

Computer Science · Cache levels

Fastest to slowest

How quickly the CPU can get data from it

1 · Fastest4 · Slowest
  1. RAM

    Larger in capacity than any cache level

  2. Level two cache

    Larger than level one

  3. Level one cache

    The smallest capacity

  4. Level three cache

    Larger than level two

Cache and performance

?

Reason it through

Why does having cache make a computer system perform better?

Link 1 of 3

First link · your turn

What does cache hold?

2
Locked — reveal the link above first
3
Locked — reveal the link above first

Computer Science · Cache

Which idea is yours?

A cache is holding some data. The CPU then fetches something new from RAM.

Which is closest to what you think happens?
How sure are you?

Computer Science · Cache

Explain it in your own words

Explain how cache improves the performance of a computer system. [3 marks]

0 words · your answer stays on this page and is not sent anywhere.

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

A small, fast store that the CPU checks before it goes to RAM. Find out why it helps, and why it does not keep everything.

What you need to know

  • Cache is a small storage location for frequently used instructions and data.
  • It is faster than RAM but smaller in capacity, and that is how it improves a computer system's performance.
  • Have a goYour mate Sam says, "Cache must be bigger than RAM, otherwise how could it help?" Is Sam right?

    No. Cache is smaller than RAM. It helps by being faster.

    Sam has mixed up size and speed. Cache is faster than RAM but smaller in capacity.

  • Level one cache is usually part of the CPU, and it has the smallest capacity.
  • Level one is also the fastest cache level, as it has the same speed as the CPU.
  • Level two cache is usually part of the CPU but further away than level one, with a larger capacity.
  • Level two is slower than level one, but still significantly faster than RAM.
  • Level three cache is either part of the CPU or near it on the motherboard, and it is the furthest away.
  • Level three has a larger capacity than level two and is slower than it, but still faster than RAM.
  • Have a goLevel three is slower than level two. Does that make level three slower than RAM as well?

    No. Level three is still faster than RAM.

    Slower than level two is not the same as slower than RAM. Each cache level is still faster than RAM.

  • The CPU checks through the cache levels before going to RAM, and it is faster if it finds what it needs there.
  • Data fetched from RAM is copied into level three, then two, then one, pushing out older, less frequently used data.
  • Have a goLevel one is full when new data arrives from RAM. Predict what happens to the data already sitting there.

    Older, less frequently used data is pushed out.

    The new data is copied in and pushes out older, less frequently used data, so cache does not just fill up and stay put.

The big picture

Cache is a small storage location for frequently used instructions and data, so the CPU can fetch them quickly. It is faster than RAM but smaller in capacity. Level one is smallest and fastest, level three largest and slowest, and each is still faster than RAM. The CPU checks the cache levels before RAM. Data fetched from RAM is copied into levels three, two and one, pushing out older, less frequently used data.

Key points

1Cache holds frequently used instructions and data in a small storage location.
2Cache is faster than RAM but smaller in capacity.
3Level one is smallest and fastest; level three is largest and slowest of the three, but still faster than RAM.
4The CPU checks through the cache levels before going to RAM, and finding what it needs in cache is faster.
5Data fetched from RAM is copied into level three, two and one, pushing out older, less frequently used data.

Worked example

Problem

The CPU needs a piece of data. It is not in level one cache, but it is in level two cache. Describe what happens, in order, and say how this compares with going to RAM.

⚠ Watch out

Thinking cache is just extra storage that keeps whatever goes into it. Cache is small, and newly fetched data pushes out older, less frequently used data. The other slip is mixing up the order: the CPU checks the cache levels before it goes to RAM.

🧠

Memory hook

One, two, three, then RAM: the closer the level, the faster it is and the less it holds.

✓

Check yourself

Cover the page. Say the order the CPU looks in, which level is smallest and fastest, and what happens to data fetched from RAM.

Flashcards

(11)
What is cache?
A small storage location for frequently used instructions and data, so they are quickly available for the CPU to fetch.
Cache compared with RAM: speed and capacity?
Cache is faster than RAM but smaller in capacity.
Where is level one cache, and how big is it?
Usually part of the CPU. It has the smallest capacity of the cache levels.
Why is level one the fastest cache level?
It has the same speed as the CPU.
Level two cache compared with level one and with RAM?
Usually part of the CPU but further away. Larger than level one and slower than it, but still significantly faster than RAM.
Where is level three cache?
Either part of the CPU or near it on the motherboard. It is the furthest away.
Level three compared with level two and with RAM?
Larger than level two and slower than it, but still faster than RAM.
Level three or RAM: which does the CPU look in first?
Level three. RAM is the last stop.
When is a fetch faster?
When the CPU finds the data or instructions in a cache level.
Data has just been fetched from RAM. Where is it copied?
Into level three, then level two, and finally level one.
What does newly copied data do to what is already in cache?
It pushes out older, less frequently used data, so the new data is readily available for future use.

Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.

Learning with Lightbulb is opening soon

You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.

Keep me posted

More OCR GCSE Computer Science topics

See the full OCR Computer Science curriculum →

How this lesson was checked. This OCR GCSE Computer Science (specification J277)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 14 November 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.