Skip to main content

Cache operation

Short answer

CPU sends address; cache compares tag with stored tags. On hit, data is accessed at cache speed. On miss, the entire block is fetched from main memory into a cache line (replacing if needed), then the requested word is delivered to CPU. Locality of reference makes most accesses hits.

Describe cache operation briefly.

The CPU puts the address on the address bus. The cache controller compares the tag part of the address with the tag stored in the cache.

  • Hit: the block is in the cache, so the word is read from (or written to) the cache at cache speed.
  • Miss: the block is not in the cache, so the whole block is read from main memory and stored in a cache line (replacing an old block if needed), and the requested word is given to the CPU.

Because of locality of reference most accesses are hits, so the average access time is close to the cache access time.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Organization and Architecture chapter 6 questions →