GCSE · Computer Science · OCR · Spec J277

Cache (primary storage context)

Your CPU can do sums faster than RAM can hand it the numbers. Cache is the trick that stops it standing around waiting.

Computer science · Primary storage

Which level is it?

Pick a property, then pick the level it describes. Commit before you read the reason.

Still to sort

Level one cache (0)

Closest to the CPU.

Where the line is: Level one is the smallest and the fastest. It is the one that runs at the same speed as the CPU.

Level two cache (0)

The middle level.

Where the line is: Level two is further away and larger than level one, but not as far or as large as level three.

Level three cache (0)

The furthest level.

Where the line is: Level three is the furthest from the CPU and the largest of the three. It may even sit just off the CPU, on the motherboard.

7 of 7 still to sort.

Cache comes in three levels. Each property below belongs to exactly one of them.

Exam line: Level one is the smallest and fastest. Level three is the biggest and slowest of the three, but still faster than RAM.
Watch out: Slower than level one does not mean slow. Every cache level is still faster than RAM.

Cache vs RAM

CachevsRAM

Cache is not just extra RAM. Here is how they differ.

Focus

Speed

Cache

Faster than RAM

RAM

Slower than cache

The insight

Speed is what cache is for: the CPU gets to things quicker.

Capacity

Cache

Smaller

RAM

Larger

What it holds for the CPU

Cache

Frequently used instructions and data

RAM

What the CPU needs when it is not in a cache level

When the CPU looks

Cache

Checked first, through level one, two and three

RAM

Checked after the cache levels

Computer science · Primary storage

Follow one request

At each step, choose what the CPU finds.

Level one → Level two → Level three

  • First stop: level one cache.

4 possible routes.

On The CPU needs an instruction or some data. 2 branches to choose from.

The CPU needs an instruction or some data. Walk the route it takes, one check at a time.

Exam line: The CPU checks level one, then level two, then level three, then RAM. Finding what it needs in a cache level is faster.
Watch out: Only one route is taken per request. The CPU stops as soon as it finds what it needs.

Predict, then check

The CPU needed something that was in none of the cache levels, so it fetched it from RAM.

Where does that fetched data go next?

Computer science · Primary storage

Explain it in your own words

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

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

Exam line: Say what cache stores, say why that helps, and make the comparison with RAM.

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

Three levels of cache that trade speed for size, and how the CPU uses them before it goes to RAM.

What you need to know

  • Cache saves frequently used instructions and data in a small storage location, so the CPU can fetch them quickly.
  • It's faster than RAM, but smaller in capacity.
  • Have a goA classmate says, 'Cache is just extra RAM, only bigger.' Be kind. What do they have wrong?

    Cache is smaller than RAM, not bigger. It is the faster one.

    Cache trades capacity for speed: it is faster than RAM but smaller in capacity.

  • There are three levels of cache. Level one is closest to the CPU, and each step further out gives more capacity but less speed.
  • Have a goLevel two sits further from the CPU than level one. Will it be bigger or smaller, faster or slower?

    Bigger and slower than level one.

    Each step further from the CPU gives more capacity but less speed, so level two beats level one on size and loses on speed.

  • Level one is usually part of the CPU, has the smallest capacity and is the fastest, at the same speed as the CPU.
  • Level two is usually part of the CPU, further away than level one, and has a larger capacity.
  • Slower than level one, level two is still significantly faster than RAM.
  • Level three is either part of the CPU or near it on the motherboard, and is the furthest away.
  • Bigger and slower than level two, level three is still faster than RAM.
  • When it needs something, the CPU checks through the cache levels before RAM, and it's faster if it finds it in a cache level.
  • Have a goThe CPU needs an instruction, and it happens to be in level two. Does it have to go all the way to RAM?

    No. It checks level one, finds nothing, then finds the instruction in level two.

    The CPU checks through the cache levels before RAM, and it is faster whenever it finds what it needs in a cache level.

  • Data fetched from RAM is copied into level three, level two and finally level one, pushing out older, less frequently used data.

The big picture

Cache is a small, fast store for frequently used instructions and data. It comes in three levels, and the CPU checks them in order before it ever bothers RAM.

Key points

1Cache is a small store for frequently used instructions and data. It is faster than RAM but smaller in capacity.
2There are three levels: level one is the smallest and fastest, level three is the largest and slowest of the three, and all three are faster than RAM.
3The CPU checks level one, then level two, then level three, then RAM. Finding what it needs in a cache level is faster.
4Data fetched from RAM is copied into level three, level two and level one, pushing out older, less frequently used data.

Worked example

Problem

A computer has three cache levels. Cache P is the largest and the furthest from the CPU. Cache Q is the smallest and runs at the same speed as the CPU. Cache R sits in between. Which level is each one, and in what order does the CPU check them and RAM?

⚠ Watch out

Treating cache as 'extra RAM'. Cache is faster than RAM but smaller, and it keeps frequently used instructions and data, not just instructions. Another slip is thinking level three is slow like RAM: it is the slowest cache level, but it is still faster than RAM.

🧠

Memory hook

Desk, shelf, cupboard. The desk (level one) is closest and quickest but holds least; the cupboard (level three) holds most and takes longest. All beat walking to the library (RAM).

✓

Check yourself

Cover the page. Say what makes level one different from level three, then say what the CPU does when it can't find what it needs in any cache level.

Flashcards

(12)
What is cache?
A small storage location for frequently used instructions and data.
How does cache compare with RAM?
Cache is faster than RAM, but smaller in capacity.
Why does cache improve performance?
It saves frequently used instructions and data so they are quickly available for the CPU to fetch.
How many levels of cache are there?
Three: level one, level two and level three.
Which cache level is the smallest and fastest?
Level one. It runs at the same speed as the CPU.
Where is level one cache usually found?
Usually part of the CPU.
How does level two differ from level one?
Level two is further from the CPU, has a larger capacity and is slower.
How fast is level two compared with RAM?
Slower than level one, but significantly faster than RAM.
Where can level three cache be found?
Either part of the CPU or near it on the motherboard. It is the furthest away.
How does level three compare with level two?
Larger capacity and slower, but still faster than RAM.
In which order does the CPU look for what it needs?
Through the cache levels first, then RAM. It is faster if found in a cache level.
What happens to data fetched from RAM?
It is copied into level three, level two and finally level one, pushing out older, less frequently used data.

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 30 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.