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.
Press Next › to move one step. Each step is one move the CPU makes.
Cache and performance
Reason it through
Why does having cache make a computer system perform better?
First link · your turn
What does cache hold?
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
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?
Cache compared with RAM: speed and capacity?
Where is level one cache, and how big is it?
Why is level one the fastest cache level?
Level two cache compared with level one and with RAM?
Where is level three cache?
Level three compared with level two and with RAM?
Level three or RAM: which does the CPU look in first?
When is a fetch faster?
Data has just been fetched from RAM. Where is it copied?
What does newly copied data do to what is already in cache?
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 postedMore OCR GCSE Computer Science topics
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.