2,048 Block Frames Starting From B B 0 2,047 - So That R 11 Bits.
2,048 Block Frames Starting From B B 0 2,047 - So That R 11 Bits.
2,048 Block Frames Starting From B B 0 2,047 - So That R 11 Bits.
Problem 5.9 – Consider a cache ( M1 ) and memory ( M2 ) hierarchy with the following
characteristics :
Assume eight-word cache blocks and a set size of 256 words with set-associative mapping.
b. Calculate the effective memory access time with a cache hit ratio of h = 0.95 .
Answers :
) 1 block = 8 word → b = 23 ↔ w = 3.
m 211
associativity. Then, number of sets, v = = = 26 or 64 sets starting from
k 25
S0 − S63 . Hence, each set will consist of 32 block frames. The bit set number,
d = log 2 v = 6 bits.
Arwin – 23206008@2006
9
Mapping Table
B0 , B1 , ......., B32
0 (000000) 0, 64, 128, ……, 131008
36 (100100) B1152 , B65 , ......., B1183 36, 100, 167, ……, 131047
63 (111111) B2016 , B65 , ......., B2047 63, 127, 191, ……, 131071
Arwin – 23206008@2006
10
Arwin – 23206008@2006
11
n
Teff = ∑ f i .t i where n is nth -memory hierarchy.
i =1
) Cache hit ratio, h1 = 0.95 and the access to the outermost memory, M 2 , is always
hit or h2 = 1
Teff = h1 t1 + (1 − h1 ) h2 t 2
= ( 0.95 )( 50 ) + (1 − 0.95 )(1)( 400 )
= 47.5 + 20
= 67.5 ns
Arwin – 23206008@2006