356 views
1 votes
1 votes
A byte addressable computer has a small data cache capable of holding 16 32-bit words. Each cache block consist of four 32 bits words. For the following sequence of addresses (in hexadecimal). The miss ratio if 4-way set associative LRU cache is used is ______.

                                                100, 104, 108, 104, 107, 108, 105, 102, 108, 103

1 Answer

0 votes
0 votes

No of blocks in cache = 4 (each containing 4 words of 32 bit each)

As it is 4 way set associative means one set contains 4 blocks, hence there is only one set in cache, it behaves like associative cache where we can place a main memory block to any cache block.

But we have to use LRU here for block replacement.

100- Miss

104- Miss

108- Miss

104- Hit

107-Miss (Cache is full here)

108- Hit

105- Miss ( Replaces 100)

102- Miss (Replaces 104)

108- Hit 

103- Miss ( Replaces 107)

Out of 10 references 7 misses are there

Miss ratio= 7/10 = 0.7

Hence 0.7 should be the correct answer

Related questions

2 votes
2 votes
2 answers
2
Rohit Gupta 8 asked Nov 18, 2017
1,283 views
Suppose that cache access time is 7 ns, main memory access time is 50 ns and disk space access time is 1200 ns. If the hit rate of cache is 60% and of main memory hier...
4 votes
4 votes
1 answer
3
Gaurav Sharma asked Jan 29, 2016
909 views
My understanding and doubts are First of all TLB is accessed.If there is TLB hit, do we consider this asHit for 1-level PT only and search the TLB again for 2-level PT, o...