Memory Hierarchy

Which policy, on a write miss, writes directly to the lower level without loading the line into the cache?

  1. AWrite-allocate
  2. BWrite-back
  3. CNo-write-allocate
Show answer and explanation

Answer: C. No-write-allocate

Writing straight to the lower level on a write miss without loading the line is no-write-allocate, commonly paired with write-through. It avoids useless fetches for data that is written once and not read back. Write-allocate instead loads the line and then writes it, which pays off when written data is soon reused, so it is commonly paired with write-back. Write-back governs when hits are propagated to memory, a separate axis from whether a miss loads the line.

  • A. Write-allocate loads the line and then writes it.
  • B. Write-back concerns when writes reach memory, separate from the miss decision.
  • C. Correct. It writes to the lower level without loading the line.
Practice this topic Back to topic

More Memory Hierarchy questions

  1. A fully associative cache holding 2 lines with LRU replacement starts empty. If blocks are referenced in the order A, B, A, C, B, A, how many misses occur?
  2. For which access pattern is hardware prefetching especially effective?
  3. When inserting software prefetch instructions, which statement about how far ahead to fetch (the prefetch distance) is correct?
  4. In the loop above, an int is 4 bytes, a cache line is 64 bytes, and the array is not cached and starts on a line boundary. Without prefetching, what is the miss rate for reading the array?
  5. What is the main purpose of loop blocking (tiling), used for example in matrix multiplication?