224k views
0 votes
Consider the following access pattern: A, B, C, A. Assume that A, B, and C are memory addresses each of which are in a different block of memory. Further, assume A, B and Care generated in a uniformly random way (each block is equally likely) and that a "true" LRU replacement algorithm is used. To receive credit you must briefly show your work. What is the probability that the second instance of "A" will be a hit if:

i. The cache has 2 lines and is fully-associative (1)
ii. The cache has 4 lines and is fully-associative [1].
iii. The cache has 2 lines and is direct-mapped [2].
iv. The cache has 4 lines and is direct-mapped [2]
V. The cache has 4 lines and is two-way set associative? [3]

User Clops
by
5.0k points

1 Answer

6 votes

Answer:

Step-by-step explanation:

Attached is the solution

Consider the following access pattern: A, B, C, A. Assume that A, B, and C are memory-example-1
Consider the following access pattern: A, B, C, A. Assume that A, B, and C are memory-example-2
User Armin Rigo
by
5.0k points