Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago