Skip to main content

Elements of cache design

Short answer

Cache design involves cache size (balance speed and hit ratio), mapping function (direct, associative, set-associative), replacement algorithm (LRU, FIFO, etc.), write policy (write-through or write-back), line size (typically 8–64 bytes), number of caches (L1, L2, split/unified), and address type (logical or physical).

Explain the various types of elements of cache design.

The main elements (design parameters) of cache design are:

  1. Cache size: small enough for low cost and fast access, large enough for a high hit ratio.
  2. Mapping function: direct, associative or set associative; decides where a block may be placed.
  3. Replacement algorithm: LRU, FIFO, LFU or random; chooses the block to remove when the cache or set is full.
  4. Write policy: write-through, write-back or write-once; decides when main memory is updated.
  5. Line (block) size: larger lines exploit spatial locality but fewer lines fit and the miss penalty rises; typical sizes are 8 to 64 bytes.
  6. Number of caches: multilevel (L1, L2, L3) and unified or split (separate instruction and data) caches.
  7. Cache addresses: logical (virtual) cache or physical cache, depending on whether it sits before or after the MMU.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Organization and Architecture chapter 6 questions →