GCSE · Computer Science · OCR · Spec J277

Cache size

The CPU needs something now. Is it in the cache, or is it a trip to slower RAM? Cache size decides how often that trip happens.

Computer Science · Cache size

Count the trips to RAM

A made-up example, not to scale. The CPU keeps asking for four items, A to D. The small cache has room for A and B. The larger cache has room for A, B and C. D is in neither cache. A request that is not found in the cache needs a trip to RAM.

Same eight requests, two cache sizes. Before each Next, predict: found in the cache, or a trip to RAM?

RequestSmall cacheLarger cacheSmall: RAM tripsLarger: RAM trips
Ain cachein cache00

Output

 

Step 1: A is in both caches, so neither CPU needs a trip to RAM.

1 / 8

Press Next to deal out the requests one at a time. The trip tallies are counted for you.

Step 1 of 8: A is in both caches, so neither CPU needs a trip to RAM..

From bigger cache to faster processing

?

Reason it through

Why can a larger cache speed up processing?

Link 1 of 4

First link · your turn

What can a larger cache hold that a smaller one can't?

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

Cache or RAM?

CachevsRAM (main memory)

The CPU needs data. Where does it look, and what does that cost?

Focus

Where it sits

Cache

Built right into or very close to the CPU. All three levels are closer than RAM.

RAM (main memory)

Further from the CPU than any of the three cache levels.

The insight

Closeness is half the story. A request that is found close by saves the trip.

How quickly the CPU can get at it

Cache

Quicker for the CPU to access.

RAM (main memory)

Slower for the CPU to reach.

What the CPU finds there

Cache

Very small memory holding the data and instructions the CPU needs to access more frequently.

RAM (main memory)

The main memory the CPU goes to when what it needs is not in the cache.

Quick prediction

Cache size is the amount of onboard cache memory in the CPU.

Which units is cache size given in?

Computer Science · Cache size

Which idea is yours?

A friend says: 'My computer feels slow, so I'll add more cache.'

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

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

Why a larger cache means the CPU waits less, and why you generally can't just add more.

What you need to know

  • Cache is very small, super-fast memory built right into or very close to the CPU.
  • It stores the data and instructions the CPU needs to access more frequently.
  • All three levels of cache are closer to the CPU than RAM is.
  • Have a goYour classmate Sam says cache is 'a huge warehouse of everything the CPU might ever need'. What is the first thing wrong with that?

    Cache is very small.

    Cache is very small, super-fast memory. It keeps only the data and instructions the CPU needs to access more frequently.

  • Cache size is the amount of onboard cache memory in the CPU, given in kilobytes or megabytes depending on the level.
  • The cache size changes with the different levels.
  • The more cache there is, the more frequently used instructions can be stored.
  • A larger cache raises the chance of finding what the CPU needs there, so there are fewer trips to slower RAM.
  • Have a goCache X can store only one of the CPU's two frequently used instructions. Cache Y can store both. Which gives the better chance of finding what the CPU needs?

    Cache Y, the larger one.

    It's size that matters here: the larger cache can store more of the frequently used instructions, so more requests are found in it.

  • Fewer trips to RAM means the CPU spends less time waiting for data, which speeds up processing.
  • Have a goSomeone says 'a bigger cache makes the CPU itself faster'. Finish the fix: 'A bigger cache means the CPU spends less time ...'

    ... waiting for data.

    The CPU isn't changed. More requests are found in the cache, so there are fewer trips to RAM and less waiting.

  • It is generally not possible for a user to increase the cache size.

The big picture

Cache is very small, super-fast memory built into or very close to the CPU. A larger cache stores more frequently used data and instructions, so more requests are found there, there are fewer trips to RAM and the CPU waits less. A user generally can't increase it.

Key points

1Cache is very small, super-fast memory built right into or very close to the CPU, and all three levels are closer than RAM.
2Cache size is given in kilobytes or megabytes depending on the level of cache, and it changes with the different levels.
3A larger cache stores more frequently used data and instructions closer to the CPU.
4More requests are found in the cache, so there are fewer trips to the slower RAM and the CPU spends less time waiting, which speeds up processing.
5It is generally not possible for a user to increase the cache size.

Worked example

Problem

A CPU makes 20 requests for data and instructions (made-up numbers). With a smaller cache, 12 of them are found in the cache. With a larger cache, 17 are. Each request not found in the cache needs one trip to RAM. Compare the number of trips.

⚠ Watch out

Thinking a bigger cache makes the CPU itself faster. What it really does is let more frequently used data and instructions be kept close, so more requests are found there, there are fewer trips to RAM and the CPU waits less.

🧠

Memory hook

Think of a shelf next to the cooker. A bigger shelf holds more of what you use all the time, so you make fewer trips to the shops. Bigger cache, fewer trips to RAM.

✓

Check yourself

Cover the page. Explain in four short links how a larger cache leads to faster processing. Then say whether a user can generally add more cache to their computer.

Flashcards

(11)
What is cache?
Very small, super-fast memory built right into or very close to the CPU.
What does cache store?
The data and instructions the CPU needs to access more frequently.
What does 'cache size' mean?
The amount of onboard cache memory in the CPU.
Which units is cache size given in?
Kilobytes or megabytes, depending on the level of cache.
Is every level of cache the same size?
No. The cache size changes with the different levels.
Which is closer to the CPU: the three levels of cache or RAM?
All three levels of cache are closer than RAM.
Which is quicker for the CPU to access: cache or RAM?
Cache is quicker. RAM is the slower main memory.
What can a larger cache store more of?
More frequently used data and instructions, closer to the CPU.
What happens to the chance of finding what the CPU needs in the cache when the cache is larger?
It increases.
When a request is found in the cache, does the CPU need a trip to RAM for it?
No. A larger cache finds more requests, so there are fewer trips to RAM.
Can a user increase the cache size?
Generally not. It is generally not possible.

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.