index | 0 | 1 | 2 | 3 |
key | 5 | 3 | 7 | 8 |
access_time | 1 | 2 | 3 | 4 |
A fully-associate cache with four entries is initialized as above, where values corresponding to the keys are not shown. The following cache operations are performed after initialization:
lookup key 5 at time 5
insert key 6 at time 6
lookup key 9 at time 7
lookup key 3 at time 8
insert key 13 at time 9
lookup key 8 at time 10
lookup key 5 at time 11
insert key 9 at time 12
lookup key 1 at time 13
(5 points) (a) Describe the contents of the cache at the end of the above operations.
(2 points) (b) What is the hit ratio of the cache at the end of the above operations?
(3 points) (c) What is the average memory access time for the workload if a cache access cost is 10 usec and miss cost is 2000 usec?