
32
CPOfiw?
e>iefat(Or\
c
ycte.
v^ZY^oiy
jfrtll
cyfle/
SiiSE
:
CPUmtT0'5B^MMa^4^6^—SP^5d
°
Hitb
:
CPU
time
=
(CPU
execution
cycles
+
Mem-stall
cycles)
x
Cycle
time
Memory
access
^
,
Mem-stall
cycles/prog.
=
Prn^am
^
Miss
rate
x
Miss
penalty
,
,.
Memory
access
^
Mem-stall
cycles/mstr.
=
^
x
Miss
rate
x
Miss
penalty
instruction
Suppose
there
are
100
instr.
in
a
program
among
which
30%
of
load
and
store
instr.
Number
of
access/program
Number
of
access/instr.
Separate
cache
Instruction
Cache
100
Data
Cache
30
0.3
Combined
cache
Cache
130
1.3
For
separate
cache:
CPIeffective
=
CPIbase
+
Mcmoiy
Stall
per
instruction
=
CPIbase
+
I-cache
stall
per
instruction
+
D-cache
stall
per
instruction
=
CPIbase
+
I-cache
access
per
instr
x
Miss
rate
x
Miss
penalty
+
D-cache
access
per
instr
x
Miss
rate
x
Miss
penalty
For
combined
cache:
^Pleffective
=
CPIb
ase
+
Memory
stall
per
instruction
=
CPIbase
+[^ache
access
fp^ins^x
Miss
rate
x
Miss
penalty)
/