




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





Read Hit
-^
Read Miss ….. Get form memory
-^
Write Hit– Write through– Write back ( when cache block replacement if dirty)
-^
Write miss– Replace & write
Read Hit………read & no action
-^
Read Miss ….. Get form other cache/ if not from memory
-^
Write Hit– Write invalidate (other caches)– Write update (other caches)
-^
Write miss– Replace & write
-^
For memory update– Single processor options of write through & write back applicable
Cache coherence in multiprocessor systems: (a) Invalidate protocol; (b)
Update protocol for shared variables.
When the value of a variable is changes, all its
copies must either be invalidated or updated.
(a) (b)
Invalidate
Memory
Memory
P
P
P
P
Update
Memory
Memory
P
P
P
P load
x
write
#3,
x
load
x
load
x
x^
=^
1
x^
=^
1
x^
=^
1
x^
=^
1
x^
=^
1
x^
=^
1
x^
=^
3
x^
=^
3
x^
=^
3
x^
=^
3
x^
=^
1
x^
=^
1
write
#3,
x
load
x
If a processor just reads a value once and does not needit again, an update protocol may generate significantoverhead.
-^
If two processors make interleaved test and updates to avariable, an update protocol is better.
-^
Both protocols suffer from false sharing overheads (twowords that are not shared, however, they lie on the samecache line).
-^
Most current machines use invalidate protocols.
Snoopy based protocols
-^
Directory based protocols
Initiating processor perspective
-^
Other processors perspective