An access sequence of cache block addresses is of length and contains n unique block addresses. The number of unique block addresses between two consecutive accesses to the same block address is bounded above by . What is the miss ratio if the access sequence is passed through a cache of associativity exercising least-recently-used replacement policy?
View worked solution
Answer: A
To find the miss ratio, let us analyze the behavior of the Least-Recently-Used (LRU) replacement policy under the given conditions:
- Total Accesses and Unique Blocks: The total number of accesses in the sequence is , and there are unique block addresses.
- LRU Cache Behavior: Under the LRU policy, a block is evicted from a cache of associativity (or capacity) only if at least other unique blocks are accessed after its most recent access.
- No Capacity/Conflict Misses: We are given that the number of unique block addresses accessed between any two consecutive accesses to the same block is bounded above by . Since the cache associativity is , the block will never be evicted from the cache before it is accessed again. Thus, every subsequent access to an already-loaded block is guaranteed to be a cache hit.
- Compulsory Misses: Since no block is ever evicted once loaded, the only misses that occur are the very first accesses to each of the unique blocks. These are called compulsory (or cold) misses. Therefore, the total number of cache misses is exactly .
The miss ratio is defined as:
Hence, the correct option is A.
Free practice · Your answers on this page are not saved.
