Question: Checking answer, cache question I was given a question to determine whether or not each access is a hit or miss and then to determine,

Checking answer, cache question

I was given a question to determine whether or not each access is a hit or miss and then to determine, given the access latency for memory and for cache, if the system benefited from the cache - I put down what I thought were correct answers but am just wondering if I can get them checked? Thank you so much!!

This is a 2 way set associative cache with a total of 32 blocks and block size of 256 bytes. I calcuated that the leftmost 8 bits are tag bits, next 4 bits are set bits, and the last 8 are offset bits (so middle number is set bit and 2 left numbers are tag bits). LRU replacement. Cache is initially empty. Locations accessed in this order:

0x55c88 - miss compulsory

0x55774 - miss compulsory

0x5479c - miss (not sure which type)

0x54c00 - miss (not sure which type)

0x55784 - hit

0x56c80 - miss conflict

0x56718 - miss conflict

0x54738 -miss capacity

Then the hit rate would be 1/8 = 12.5%

We are given that memory access latency is 10 cycles and cache access latency is 3 cycles.

So to calculate latency with cache: (.125)(3) + (.875)(10+3) = 11.75

Without cache it is: (1)(10) = 10

11.75 > 10, so having a cache is more expensive for this system and it did not benefit from having a cache.

Does this look correct? Thank you!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!