Assume a two-level inclusive cache hierarchy, L1 and L2, where L2 is the larger of the two. Consider the following statements. S1: Read misses in a write through L1 cache do not result in writebacks of dirty lines to the L2. S2: Write allocate policy must be used in conjunction with write through caches and no-write allocate policy is used with writeback caches. Which of the following statements is correct? 

Assume a two-level inclusive cache hierarchy, L1 and L2, where L2 is the larger of the two. Consider the following statements. S1: Read misses in a write through L1 cache do not result in writebacks of dirty lines to the L2. S2: Write allocate policy must be used in conjunction with write through caches and no-write allocate policy is used with writeback caches. Which of the following statements is correct?  Correct Answer S<sub>1</sub> is true and S<sub>2</sub> is false

Answer: Option 4

Key Points

Write Allocate Policy: 

In this policy, Suppose we are trying to write into some block in the cache but the block is not available in cache i.e. write miss occurs then the block is loaded after write miss operation and the write performed in the cache. 

No-Write Allocate Policy:

In this policy, if a write miss occurs in the cache then the write operation will be performed directly in Main Memory.

Explanation:

Statement 1:Read misses in a write-through L1 cache do not result in writebacks of dirty lines to the L2.

In Write through a cache write operation will be performed on both cache and Main Memory simultaneously. so

in the case of the write-through cache, there are no dirty lines/blocks possible on Read misses. 

Hence this statement is correct.

Statement 2: Write allocate policy must be used in conjunction with write-through caches and no-write allocate policy is used with writeback caches.

This statement is not correct.

Typically Write-back cache is used with write-allocate policy and write-through caches with no-write allocate.

Related Questions