Assume a four-way set associative cache with eight blocks. The address sequence:
ID: 3763219 • Letter: A
Question
Assume a four-way set associative cache with eight blocks. The address sequence: 1, 2, 5, 1, 2, 4, 5, 9, 11, 7, 5, 11
Assuming an LRU replacement policy how many hits does this address sequence exhibit?
Assuming an MRU (most recently used) replacement policy, how many hits does this address sequence exhibit?
Redo a) and b) using direct mapped and fully associative cache organizations. Compare the hit ratios of the direct mapped, four-way set associative, and fully associative schemes.
This is what I've got so far Can anyone tell me if this is correct?
6.
a)
Hits: 5
Address
Block Address
Set 0
Set 1
Hit/ Miss
1
1 %2 = 1
1
M
2
2%2=0
2
1
M
5
5%2= 1
2
1
5
M
1
1%2=1
2
5
1
H
2
2%2=0
2
5
1
H
4
4%2=0
2
4
5
1
M
5
5%2=1
2
4
1
5
H
9
9%2=1
2
4
1
5
9
M
11
11%2=1
2
4
1
5
9
11
M
7
7%2=1
2
4
5
9
11
7
M
5
5%2=1
2
4
9
11
7
5
H
11
11%2=1
2
4
9
7
5
11
H
B)
Hits: 4
Address
Block Address
Set 0
Set 1
Hit/ Miss
1
1 %2 = 1
1
M
2
2%2=0
2
1
M
5
5%2= 1
2
1
5
M
1
1%2=1
2
5
1
H
2
2%2=0
2
5
1
H
4
4%2=0
2
4
5
1
M
5
5%2=1
2
4
1
5
H
9
9%2=1
2
4
1
5
9
M
11
11%2=1
2
4
1
5
9
11
M
7
7%2=1
2
4
1
5
9
7
M
5
5%2=1
2
4
1
9
7
5
H
11
11%2=1
2
4
1
9
7
11
M
C)
Hits: 5
Address
Block Address
Cache
Hit/ Miss
1
1 %8 = 1
1
M
2
2%8=2
1
2
M
5
5%8= 5
1
2
5
M
1
1%8=1
1
2
5
H
2
2%8=2
1
2
5
H
4
4%8=4
1
2
4
5
M
5
5%8=5
1
2
4
5
H
9
9%8=1
9
2
4
5
M
11
11%8=3
9
2
11
4
5
M
7
7%8=7
9
2
11
4
5
7
M
5
5%8=5
9
2
11
4
5
7
H
11
11%8=3
9
2
11
4
5
7
H
Hits: 5
Address
Block Address
Cache
Hit/ Miss
1
1 %8 = 1
1
M
2
2%8=2
1,2
M
5
5%8= 5
1,2,5
M
1
1%8=1
1,2,5
H
2
2%8=2
1,2,5
H
4
4%8=4
1,2,5,4
M
5
5%8=5
1,2,5,4
H
9
9%8=1
1,2,5,4,9
M
11
11%8=3
1,2,5,4,9,11
M
7
7%8=7
1,2,5,4,9,11,7
M
5
5%8=5
1,2,5,4,9,11,7
H
11
11%8=3
1,2,5,4,9,11,7
H
MRU replacement policy had the lowest hit ratio
Address
Block Address
Set 0
Set 1
Hit/ Miss
1
1 %2 = 1
1
M
2
2%2=0
2
1
M
5
5%2= 1
2
1
5
M
1
1%2=1
2
5
1
H
2
2%2=0
2
5
1
H
4
4%2=0
2
4
5
1
M
5
5%2=1
2
4
1
5
H
9
9%2=1
2
4
1
5
9
M
11
11%2=1
2
4
1
5
9
11
M
7
7%2=1
2
4
5
9
11
7
M
5
5%2=1
2
4
9
11
7
5
H
11
11%2=1
2
4
9
7
5
11
H
Explanation / Answer
Yes, it is the correct answer.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.