<s>
A	O
CPU	B-General_Concept
cache	I-General_Concept
is	O
a	O
piece	O
of	O
hardware	O
that	O
reduces	O
access	O
time	O
to	O
data	O
in	O
memory	O
by	O
keeping	O
some	O
part	O
of	O
the	O
frequently	O
used	O
data	O
of	O
the	O
main	O
memory	O
in	O
a	O
'	O
cache	O
 '	O
of	O
smaller	O
and	O
faster	O
memory	O
.	O
</s>
<s>
These	O
cache	O
hits	O
and	O
misses	O
contribute	O
to	O
the	O
term	O
average	O
access	O
time	O
(	O
AAT	O
)	O
also	O
known	O
as	O
AMAT	O
(	O
average	B-General_Concept
memory	I-General_Concept
access	I-General_Concept
time	I-General_Concept
)	O
,	O
which	O
,	O
as	O
the	O
name	O
suggests	O
,	O
is	O
the	O
average	O
time	O
it	O
takes	O
to	O
access	O
the	O
memory	O
.	O
</s>
<s>
Another	O
useful	O
metric	O
to	O
test	O
the	O
performance	O
is	O
Power	B-General_Concept
law	I-General_Concept
of	I-General_Concept
cache	I-General_Concept
misses	I-General_Concept
.	O
</s>
<s>
Processor	O
performance	O
increase	O
due	O
to	O
cache	B-General_Concept
hierarchy	I-General_Concept
depends	O
on	O
the	O
number	O
of	O
accesses	O
to	O
the	O
cache	O
that	O
satisfy	O
block	O
requests	O
from	O
the	O
cache	O
(	O
cache	O
hits	O
)	O
versus	O
those	O
that	O
do	O
not	O
.	O
</s>
<s>
Cold	O
misses	O
cannot	O
be	O
avoided	O
unless	O
the	O
block	O
is	O
prefetched	B-General_Concept
.	O
</s>
<s>
It	O
has	O
been	O
observed	O
that	O
an	O
increase	O
in	O
block	O
size	O
to	O
a	O
certain	O
extent	O
to	O
exploit	O
spatial	B-General_Concept
locality	I-General_Concept
leads	O
to	O
a	O
decrease	O
in	O
cold	O
misses	O
.	O
</s>
<s>
Generally	O
,	O
conflict	O
misses	O
are	O
measured	O
by	O
subtracting	O
the	O
number	O
of	O
misses	O
in	O
a	O
cache	O
with	O
limited	O
associativity	O
by	O
the	O
number	O
of	O
misses	O
of	O
a	O
fully	O
associative	O
cache	O
of	O
the	O
same	O
size	O
and	O
cache	B-General_Concept
block	I-General_Concept
size	O
.	O
</s>
<s>
The	O
3Cs	O
group	O
of	O
cache	O
misses	O
can	O
be	O
extended	O
to	O
4Cs	O
when	O
a	O
multi-processor	O
system	O
with	O
cache	O
is	O
involved	O
,	O
the	O
fourth	O
C	O
being	O
coherence	B-General_Concept
misses	O
.	O
</s>
<s>
The	O
coherence	B-General_Concept
miss	O
count	O
is	O
the	O
number	O
of	O
memory	O
accesses	O
that	O
miss	O
because	O
a	O
cache	O
line	O
that	O
would	O
otherwise	O
be	O
present	O
in	O
the	O
thread	O
's	O
cache	O
has	O
been	O
invalidated	O
by	O
a	O
write	O
from	O
another	O
thread	O
.	O
</s>
<s>
Coherence	B-General_Concept
in	O
a	O
multi-processor	O
system	O
is	O
maintained	O
if	O
only	O
one	O
copy	O
of	O
a	O
memory	O
block	O
is	O
present	O
or	O
all	O
the	O
copies	O
have	O
the	O
same	O
value	O
.	O
</s>
<s>
Even	O
if	O
all	O
the	O
copies	O
of	O
memory	O
block	O
do	O
not	O
have	O
the	O
same	O
value	O
,	O
it	O
does	O
n't	O
necessarily	O
lead	O
to	O
a	O
coherence	B-General_Concept
miss	O
.	O
</s>
<s>
A	O
coherence	B-General_Concept
miss	O
occurs	O
when	O
threads	O
execute	O
loads	O
such	O
that	O
they	O
observe	O
the	O
different	O
values	O
of	O
the	O
memory	O
block	O
.	O
</s>
<s>
The	O
coherence	B-General_Concept
problem	O
is	O
complex	O
and	O
affects	O
the	O
scalability	O
of	O
parallel	O
programs	O
.	O
</s>
<s>
The	O
4Cs	O
group	O
of	O
cache	O
misses	O
can	O
be	O
further	O
extended	O
to	O
5Cs	O
when	O
the	O
multi-processor	O
system	O
includes	O
a	O
coherence	B-General_Concept
directory	O
organized	O
as	O
a	O
cache	O
,	O
i.e.	O
,	O
that	O
can	O
replace	O
entries	O
.	O
</s>
<s>
If	O
the	O
directory	O
is	O
not	O
able	O
to	O
track	O
a	O
cache	O
line	O
due	O
to	O
its	O
limited	O
capacity	O
,	O
the	O
line	O
must	O
be	O
invalidated	O
from	O
the	O
processors	O
 '	O
cache	O
to	O
maintain	O
Coherence	B-General_Concept
.	O
</s>
<s>
System	O
activities	O
such	O
as	O
interrupts	B-Application
,	O
context	B-Operating_System
switches	I-Operating_System
and	O
system	B-Operating_System
calls	I-Operating_System
lead	O
to	O
the	O
process	O
being	O
suspended	O
and	O
its	O
cache	O
state	O
being	O
altered	O
.	O
</s>
<s>
Furthermore	O
,	O
cache	O
misses	O
due	O
to	O
context	B-Operating_System
switching	I-Operating_System
may	O
be	O
placed	O
into	O
two	O
categories	O
described	O
below	O
.	O
</s>
<s>
When	O
a	O
context	B-Operating_System
switch	I-Operating_System
occurs	O
,	O
the	O
cache	O
state	O
is	O
modified	O
and	O
some	O
of	O
its	O
blocks	O
are	O
replaced	O
.	O
</s>
<s>
Some	O
blocks	O
in	O
the	O
cache	O
may	O
not	O
be	O
replaced	O
due	O
to	O
context	B-Operating_System
switching	I-Operating_System
but	O
their	O
recency	O
is	O
changed	O
.	O
</s>
<s>
However	O
,	O
when	O
the	O
suspended	O
process	O
resumes	O
execution	O
,	O
reordered	O
blocks	O
do	O
n't	O
lead	O
to	O
context	B-Operating_System
switch	I-Operating_System
misses	O
when	O
no	O
other	O
misses	O
cause	O
these	O
reordered	O
blocks	O
to	O
be	O
evicted	O
.	O
</s>
<s>
System-related	O
misses	O
become	O
significant	O
when	O
context	B-Operating_System
switching	I-Operating_System
occurs	O
regularly	O
.	O
</s>
<s>
However	O
the	O
amount	O
of	O
effect	O
the	O
cache	O
misses	O
have	O
on	O
the	O
CPI	O
also	O
depends	O
on	O
how	O
much	O
of	O
the	O
cache	O
miss	O
can	O
be	O
overlapped	O
with	O
computations	O
due	O
to	O
the	O
ILP	O
(	O
Instruction-level	O
parallelism	O
)	O
and	O
how	O
much	O
of	O
it	O
can	O
be	O
overlapped	O
with	O
other	O
cache	O
misses	O
due	O
to	O
Memory-level	B-Operating_System
parallelism	I-Operating_System
.	O
</s>
<s>
If	O
we	O
ignore	O
both	O
these	O
effects	O
,	O
then	O
the	O
average	B-General_Concept
memory	I-General_Concept
access	I-General_Concept
time	I-General_Concept
becomes	O
an	O
important	O
metric	O
.	O
</s>
<s>
If	O
the	O
access	O
latency	O
,	O
miss	O
rate	O
and	O
miss	O
penalty	O
are	O
known	O
,	O
the	O
average	B-General_Concept
memory	I-General_Concept
access	I-General_Concept
time	I-General_Concept
can	O
be	O
calculated	O
with	O
:	O
</s>
<s>
The	O
Power	B-General_Concept
law	I-General_Concept
of	I-General_Concept
cache	I-General_Concept
misses	I-General_Concept
shows	O
a	O
trend	O
in	O
the	O
capacity	O
misses	O
in	O
a	O
particular	O
application	O
of	O
the	O
program	O
as	O
affected	O
by	O
the	O
cache	O
size	O
.	O
</s>
<s>
The	O
power	B-General_Concept
law	I-General_Concept
of	I-General_Concept
cache	I-General_Concept
misses	I-General_Concept
just	O
showed	O
an	O
rough	O
approximation	O
of	O
the	O
same	O
.	O
</s>
