By LearnAllStudents Editorial Team. Source check dates are listed below.
Follow a request through memory
Imagine a small classroom model with space for two data blocks. A processor requests A, then B, then A again. Starting from an empty cache, A misses and is loaded; B misses and is loaded; the second A hits because A is still present. The model has one hit out of three requests. Real processors use cache lines and policies more complex than this example.
A trace with an explicit replacement rule
For this exercise only, assume a fully associative two-block cache and least-recently-used replacement. Starting empty, request A, B, A, C, B. The outcomes are miss, miss, hit, miss, miss. Before C arrives, B is least recently used, so C replaces B. The last B must be loaded again. That makes one hit and four misses: a hit rate of 1/5 = 20%.
Try it yourself
- Using the same two-block model and rule, trace A, A, B, A.
- What happens to the final A if the model has only one block?
- Does a higher hit rate mean every program must run faster by the same percentage?
Answers: miss, hit, miss, hit, giving 50% hits; with one block the final A misses after B replaced it; no. Runtime also depends on access cost, workload, instructions and other bottlenecks.
Keep CPU cache separate from browser cache
Both reuse previously obtained information, but the content and mechanisms differ. CPU cache holds memory data or instructions; a browser may cache web resources. Clearing a browser cache is not a remedy for a CPU cache miss. Von Neumann architecture is a broader organisation topic and needs its own explanation rather than being treated as another name for cache.
How a tutor would approach this
Bring the cache capacity, access sequence and replacement rule. A trace cannot be marked reliably if these assumptions are missing.
Frequently asked questions
Is a cache miss a software crash?
No. It is an ordinary memory-access outcome when the requested block is absent from the cache being checked.
What is a cache hit?
The requested block is present in the cache being checked.
Can I trace cache behaviour without a replacement rule?
Some early requests may be clear, but replacement outcomes require the cache organisation and policy to be stated.
Is CPU cache the same as RAM?
No. Cache is a separate part of the memory hierarchy used to provide faster access to selected memory contents.
Keep exploring your course
Continue in the Computer Science library
Choose another explanation and check your reasoning with its practice answers.
Official sources
- Cornell CS 3410: caches and memory hierarchy (checked 2026-11-23)
Related pages
Try a free 30-minute demo
Work through a question with a tutor. No payment needed.
Request a free 30-minute demo