For inclusion to hold between two cache levels and in a multi-level cache hierarchy, which of the following are necessary?
-
must be write-through cache
-
must be a write-through cache
-
The associativity of must be greater than that of
-
The cache must be at least as large as the cache
View worked solution
Answer: A
The inclusion property in a multi-level cache hierarchy ( and ) states that all data present in the cache must also be present in the cache ().
Let us evaluate each statement to determine if it is a necessary condition:
- Statement IV (The cache must be at least as large as the cache): This is necessary. If the capacity of is smaller than , then cannot physically hold all the blocks that can hold when is fully utilized. Therefore, is a fundamental requirement.
- Statements I & II ( / must be write-through): These are not necessary. Write policies (write-through vs. write-back) manage how updates are propagated to lower levels of the memory hierarchy. Inclusion can be maintained with write-back caches by tracking dirty states and coordinating write-backs during evictions.
- Statement III (The associativity of must be greater than that of ): This is not necessary. Although higher associativity in reduces conflict evictions, inclusion can still be strictly enforced with any associativity by using back-invalidation. When a block is evicted from , an invalidation signal is sent to to evict the corresponding block if it exists there.
Thus, only statement IV is a necessary condition.
Free practice · Your answers on this page are not saved.
