Problem 1 :
1)
2) I
, J . BLIJCO]
3) ASF][5]
Problem 2 :
1) offset [h-0) = 5 bits so 32 bytes/block So cache block size is words
2) Block index = 5 bits So 32
data
blocks
tag
-
+ (valid bit)
3) cache block size = bits 0x32 bite bits + 1 = 311 bits
ratio =
3/256 = 1 . 21
4) tag index offset Hit/miss replaced.
OXO OX00 0x00 M
OXO OX00 oxoh H
oxo 0xoo oxlo H
OXO oxon oxon M
OXO 0x07 0x08 M
OXO OXO5 O X00 M
OX1 OXOp O X00 M oxoo-oXIf
0 X 0 OXOO ox1e M OX400-0x414
OXO Oxoh Oxoc H
0x30x00ox1 M 0x00-ox1f
OXO OX05 OX14 M
OX2 oxon Oxon M 0x80 -0x9f .
5) 4/12 = 33 %
Problem 3 :
1) Clock 1 :0 . 66 = 1 51
. GH2
Clock 2
:g =
1 11
.
GH2
2) AMAT = C+ (1-2) Mem
bot a
P1 : AMAT 1 0 08 107 9 56
cycles
= + .
x = .
P2 1 06 x78
y l
:
AMAT = + 0 .
= 5 . 30 ,
3) P1 : Ix (1 + 0 05 .
x 107) +0 . 36 1x 0 .
08x107 = 12 .
64 I
cycles - CPI = 12 . 64
P2 : #x (1 + 0 . 06 x+0) + 0 .
36 1x 0 . 06 x 78 = 7 .
36 xIycly >
- CPT = 7 . 3)
P2 is times
L6h = 1 . 71
faster
h) AMAT = C ,
+ (1-h ) [2 + 11-ec) Mem] .
12 hit time
=62 8 59
yes
=
= .
AMAT = 1 0 08 (9 + 0 95 x 107) 3 852
cycles .
.
+ .
= .
with miss
AMAT is worse 12 cache since 12 has
high rate &
long hit time.
5) CP12 = 2 + 0 . 08 x(9 + 0 . 95 x 107) + 0 . 36 x0 00
. x (9+ 0 95
.
x107) = 13 04 .
6) AMAT with 12 < Amat with 11
2 + 0 . 08 [9 m2x107]<9
+ . 56
m2 < 0 . 916 - 12 miss rate should be less than 91 . 6 %
7) CPI1 with L2 < CDI2 with 11
Conly
CPIt with 12 X 0 66 <7 36x0 9 CP12 with 12 < 10 oh .
cycles
.
.
. - .
CPI1 = AMATI + 0 36.
(AMATI-1) < 10 04.
AMAT2 <7 65 .
(1 + 0 08
.
[9 + m2 x 107)) < 7 65 .
- m2 < 0 69
.
12 miss rate should be less than 69 %