CPUs and architecture

Which correctly describes the write-back policy for caches?

  1. AWrites skip the cache and update only main memory
  2. BEvery write always updates both the cache and main memory
  3. COnly the cache is updated at first, and the data is written back to main memory when it is evicted from the cache
Show answer and explanation

Answer: C. Only the cache is updated at first, and the data is written back to main memory when it is evicted from the cache

In write-back, writes go only to the cache, and modified (dirty) lines are written back to main memory when evicted. This reduces main-memory accesses and is fast, but makes coherence management more complex. Updating both every time is write-through.

  • A. This describes writing without using the cache.
  • B. Updating both cache and memory every time is write-through.
  • C. Correct. Data is written back to main memory on eviction.
Practice this topic Back to topic

More CPUs and architecture questions

  1. Which correctly describes a set-associative cache?
  2. What is the typical size of a cache line (cache block) in many current CPUs?
  3. In a pipeline, when the next instruction immediately uses the result of the previous one (a data hazard), which technique passes the result directly to the next instruction without waiting for it to be written to the register?
  4. Which correctly describes little-endian byte order?
  5. Which technique lets one CPU core process instructions from multiple threads at the same time to make better use of the core's execution units?