<s>
Bus	O
snooping	O
or	O
bus	O
sniffing	O
is	O
a	O
scheme	O
by	O
which	O
a	O
coherency	O
controller	O
(	O
snooper	O
)	O
in	O
a	O
cache	B-General_Concept
(	O
a	O
snoopy	B-General_Concept
cache	I-General_Concept
)	O
monitors	O
or	O
snoops	O
the	O
bus	O
transactions	O
,	O
and	O
its	O
goal	O
is	O
to	O
maintain	O
a	O
cache	B-General_Concept
coherency	I-General_Concept
in	O
distributed	B-Operating_System
shared	I-Operating_System
memory	I-Operating_System
systems	I-Operating_System
.	O
</s>
<s>
A	O
cache	B-General_Concept
containing	O
a	O
coherency	O
controller	O
(	O
snooper	O
)	O
is	O
called	O
a	O
snoopy	B-General_Concept
cache	I-General_Concept
.	O
</s>
<s>
When	O
specific	O
data	O
is	O
shared	O
by	O
several	O
caches	B-General_Concept
and	O
a	O
processor	O
modifies	O
the	O
value	O
of	O
the	O
shared	O
data	O
,	O
the	O
change	O
must	O
be	O
propagated	O
to	O
all	O
the	O
other	O
caches	B-General_Concept
which	O
have	O
a	O
copy	O
of	O
the	O
data	O
.	O
</s>
<s>
This	O
change	O
propagation	O
prevents	O
the	O
system	O
from	O
violating	O
cache	B-General_Concept
coherency	I-General_Concept
.	O
</s>
<s>
If	O
a	O
transaction	O
modifying	O
a	O
shared	O
cache	B-General_Concept
block	O
appears	O
on	O
a	O
bus	O
,	O
all	O
the	O
snoopers	O
check	O
whether	O
their	O
caches	B-General_Concept
have	O
the	O
same	O
copy	O
of	O
the	O
shared	O
block	O
.	O
</s>
<s>
If	O
a	O
cache	B-General_Concept
has	O
a	O
copy	O
of	O
the	O
shared	O
block	O
,	O
the	O
corresponding	O
snooper	O
performs	O
an	O
action	O
to	O
ensure	O
cache	B-General_Concept
coherency	I-General_Concept
.	O
</s>
<s>
The	O
action	O
can	O
be	O
a	O
flush	O
or	O
an	O
invalidation	B-General_Concept
of	O
the	O
cache	B-General_Concept
block	O
.	O
</s>
<s>
It	O
also	O
involves	O
a	O
change	O
of	O
cache	B-General_Concept
block	O
state	O
depending	O
on	O
the	O
cache	B-General_Concept
coherence	I-General_Concept
protocol	O
.	O
</s>
<s>
When	O
a	O
processor	O
writes	O
on	O
a	O
shared	O
cache	B-General_Concept
block	O
,	O
all	O
the	O
shared	O
copies	O
in	O
the	O
other	O
caches	B-General_Concept
are	O
invalidated	B-General_Concept
through	O
bus	O
snooping	O
.	O
</s>
<s>
All	O
the	O
other	O
copies	O
in	O
other	O
caches	B-General_Concept
are	O
invalidated	B-General_Concept
.	O
</s>
<s>
MSI	B-General_Concept
,	O
MESI	B-General_Concept
,	O
MOSI	B-General_Concept
,	O
MOESI	B-General_Concept
,	O
and	O
MESIF	B-General_Concept
protocols	I-General_Concept
belong	O
to	O
this	O
category	O
.	O
</s>
<s>
When	O
a	O
processor	O
writes	O
on	O
a	O
shared	O
cache	B-General_Concept
block	O
,	O
all	O
the	O
shared	O
copies	O
of	O
the	O
other	O
caches	B-General_Concept
are	O
updated	O
through	O
bus	O
snooping	O
.	O
</s>
<s>
This	O
method	O
broadcasts	O
a	O
write	O
data	O
to	O
all	O
caches	B-General_Concept
throughout	O
a	O
bus	O
.	O
</s>
<s>
Dragon	B-General_Concept
and	O
firefly	B-Device
protocols	O
belong	O
to	O
this	O
category	O
.	O
</s>
<s>
The	O
cache	B-General_Concept
would	O
have	O
three	O
extra	O
bits	O
:	O
</s>
<s>
Each	O
cache	B-General_Concept
line	O
is	O
in	O
one	O
of	O
the	O
following	O
states	O
:	O
"	O
dirty	O
"	O
(	O
has	O
been	O
updated	O
by	O
local	O
processor	O
)	O
,	O
"	O
valid	O
"	O
,	O
"	O
invalid	O
"	O
or	O
"	O
shared	O
"	O
.	O
</s>
<s>
A	O
cache	B-General_Concept
line	O
contains	O
a	O
value	O
,	O
and	O
it	O
can	O
be	O
read	O
or	O
written	O
.	O
</s>
<s>
Writing	O
on	O
a	O
cache	B-General_Concept
line	O
changes	O
the	O
value	O
.	O
</s>
<s>
Each	O
value	O
is	O
either	O
in	O
main	O
memory	O
(	O
which	O
is	O
very	O
slow	O
to	O
access	O
)	O
,	O
or	O
in	O
one	O
or	O
more	O
local	O
caches	B-General_Concept
(	O
which	O
is	O
fast	O
)	O
.	O
</s>
<s>
When	O
a	O
block	O
is	O
first	O
loaded	O
into	O
the	O
cache	B-General_Concept
,	O
it	O
is	O
marked	O
as	O
"	O
valid	O
"	O
.	O
</s>
<s>
On	O
a	O
read	O
miss	O
to	O
the	O
local	O
cache	B-General_Concept
,	O
the	O
read	O
request	O
is	O
broadcast	O
on	O
the	O
bus	O
.	O
</s>
<s>
The	O
"	O
valid	O
"	O
state	O
means	O
that	O
the	O
cache	B-General_Concept
line	O
is	O
current	O
.	O
</s>
<s>
On	O
a	O
local	O
write	O
miss	O
(	O
an	O
attempt	O
to	O
write	O
that	O
value	O
is	O
made	O
,	O
but	O
it	O
's	O
not	O
in	O
the	O
cache	B-General_Concept
)	O
,	O
bus	O
snooping	O
ensures	O
that	O
any	O
copies	O
in	O
other	O
caches	B-General_Concept
are	O
set	O
to	O
"	O
invalid	O
"	O
.	O
</s>
<s>
"	O
Invalid	O
"	O
means	O
that	O
a	O
copy	O
used	O
to	O
exist	O
in	O
the	O
cache	B-General_Concept
,	O
but	O
it	O
is	O
no	O
longer	O
current	O
.	O
</s>
<s>
The	O
caching	B-General_Concept
logic	O
monitors	O
the	O
bus	O
and	O
detects	O
if	O
any	O
cached	O
memory	O
is	O
requested	O
.	O
</s>
<s>
If	O
the	O
cache	B-General_Concept
is	O
dirty	O
and	O
shared	O
and	O
there	O
is	O
a	O
request	O
on	O
the	O
bus	O
for	O
that	O
memory	O
,	O
a	O
dirty	O
snooping	O
element	O
will	O
supply	O
the	O
data	O
to	O
the	O
requester	O
.	O
</s>
<s>
one	O
cache	B-General_Concept
would	O
have	O
a	O
dirty	O
address	O
and	O
the	O
other	O
cache	B-General_Concept
is	O
writing	O
)	O
then	O
the	O
cache	B-General_Concept
will	O
ignore	O
that	O
request	O
.	O
</s>
<s>
The	O
new	O
cache	B-General_Concept
will	O
be	O
marked	O
as	O
dirty	O
,	O
valid	O
and	O
exclusive	O
and	O
that	O
cache	B-General_Concept
will	O
now	O
take	O
responsibility	O
for	O
the	O
address	O
.	O
</s>
<s>
The	O
advantage	O
of	O
using	O
bus	O
snooping	O
is	O
that	O
it	O
is	O
faster	O
than	O
directory	B-General_Concept
based	I-General_Concept
coherency	I-General_Concept
mechanism	I-General_Concept
.	O
</s>
<s>
The	O
data	O
being	O
shared	O
is	O
placed	O
in	O
a	O
common	O
directory	O
that	O
maintains	O
the	O
coherence	O
between	O
caches	B-General_Concept
in	O
a	O
directory-based	O
system	O
.	O
</s>
<s>
The	O
disadvantage	O
of	O
bus	O
snooping	O
is	O
limited	O
scalability	B-Architecture
.	O
</s>
<s>
Frequent	O
snooping	O
on	O
a	O
cache	B-General_Concept
causes	O
a	O
race	O
with	O
an	O
access	O
from	O
a	O
processor	O
,	O
thus	O
it	O
can	O
increase	O
cache	B-General_Concept
access	O
time	O
and	O
power	O
consumption	O
.	O
</s>
<s>
Since	O
the	O
bus	O
snooping	O
does	B-Architecture
not	I-Architecture
scale	I-Architecture
well	O
,	O
larger	O
cache	B-General_Concept
coherent	O
NUMA	O
(	O
ccNUMA	O
)	O
systems	O
tend	O
to	O
use	O
directory-based	B-Architecture
coherence	I-Architecture
protocols	I-Architecture
.	O
</s>
<s>
When	O
a	O
bus	O
transaction	O
occurs	O
to	O
a	O
specific	O
cache	B-General_Concept
block	O
,	O
all	O
snoopers	O
must	O
snoop	O
the	O
bus	O
transaction	O
.	O
</s>
<s>
Then	O
the	O
snoopers	O
look	O
up	O
their	O
corresponding	O
cache	B-General_Concept
tag	I-General_Concept
to	O
check	O
whether	O
it	O
has	O
the	O
same	O
cache	B-General_Concept
block	O
.	O
</s>
<s>
In	O
most	O
cases	O
,	O
the	O
caches	B-General_Concept
do	O
not	O
have	O
the	O
cache	B-General_Concept
block	O
since	O
a	O
well	O
optimized	O
parallel	O
program	O
does	O
n’t	O
share	O
much	O
data	O
among	O
threads	O
.	O
</s>
<s>
Thus	O
the	O
cache	B-General_Concept
tag	I-General_Concept
lookup	O
by	O
the	O
snooper	O
is	O
usually	O
an	O
unnecessary	O
work	O
for	O
the	O
cache	B-General_Concept
who	O
does	O
not	O
have	O
the	O
cache	B-General_Concept
block	O
.	O
</s>
<s>
But	O
the	O
tag	O
lookup	O
disturbs	O
the	O
cache	B-General_Concept
access	O
by	O
a	O
processor	O
and	O
incurs	O
additional	O
power	O
consumption	O
.	O
</s>
<s>
A	O
snoop	O
filter	O
determines	O
whether	O
a	O
snooper	O
needs	O
to	O
check	O
its	O
cache	B-General_Concept
tag	I-General_Concept
or	O
not	O
.	O
</s>
<s>
A	O
snoop	O
filter	O
is	O
a	O
directory-based	O
structure	O
and	O
monitors	O
all	O
coherent	O
traffic	O
in	O
order	O
to	O
keep	O
track	O
of	O
the	O
coherency	O
states	O
of	O
cache	B-General_Concept
blocks	O
.	O
</s>
<s>
It	O
means	O
that	O
the	O
snoop	O
filter	O
knows	O
the	O
caches	B-General_Concept
that	O
have	O
a	O
copy	O
of	O
a	O
cache	B-General_Concept
block	O
.	O
</s>
<s>
Thus	O
it	O
can	O
prevent	O
the	O
caches	B-General_Concept
that	O
do	O
not	O
have	O
the	O
copy	O
of	O
a	O
cache	B-General_Concept
block	O
from	O
making	O
the	O
unnecessary	O
snooping	O
.	O
</s>
<s>
One	O
is	O
a	O
source	O
filter	O
that	O
is	O
located	O
at	O
a	O
cache	B-General_Concept
side	O
and	O
performs	O
filtering	O
before	O
coherence	B-General_Concept
traffic	I-General_Concept
reaches	O
the	O
shared	O
bus	O
.	O
</s>
<s>
Another	O
is	O
a	O
destination	O
filter	O
that	O
is	O
located	O
at	O
receiver	O
caches	B-General_Concept
and	O
prevents	O
unnecessary	O
cache-tag	O
look-ups	O
at	O
the	O
receiver	O
core	O
,	O
but	O
this	O
type	O
of	O
filtering	O
fails	O
to	O
prevent	O
the	O
initial	O
coherence	O
message	O
from	O
the	O
source	O
.	O
</s>
<s>
Lastly	O
,	O
in-network	O
filters	O
prune	O
coherence	B-General_Concept
traffic	I-General_Concept
dynamically	O
inside	O
the	O
shared	O
bus	O
.	O
</s>
<s>
The	O
inclusive	O
snoop	O
filter	O
keeps	O
track	O
of	O
the	O
presence	O
of	O
cache	B-General_Concept
blocks	O
in	O
caches	B-General_Concept
.	O
</s>
<s>
However	O
,	O
the	O
exclusive	O
snoop	O
filter	O
monitors	O
the	O
absence	O
of	O
cache	B-General_Concept
blocks	O
in	O
caches	B-General_Concept
.	O
</s>
<s>
In	O
other	O
words	O
,	O
a	O
hit	O
in	O
the	O
inclusive	O
snoop	O
filter	O
means	O
that	O
the	O
corresponding	O
cache	B-General_Concept
block	O
is	O
held	O
by	O
caches	B-General_Concept
.	O
</s>
<s>
On	O
the	O
other	O
hand	O
,	O
a	O
hit	O
in	O
the	O
exclusive	O
snoop	O
filter	O
means	O
that	O
no	O
cache	B-General_Concept
has	O
the	O
requested	O
cache	B-General_Concept
block	O
.	O
</s>
