one possible design
tagged messages — everyone gets everything, filters
contention if multiple communicators
extra information for each cache block
stored in each cache
update states based on reads, writes and heard messages on bus
different caches may have different states for same block
sample states:
| from state | hear read | hear write | read | write |
| \hline{} Invalid | — | — | blueto Shared | blueto Modified |
| Shared | — | to Invalid | — | blueto Modified |
| Modified | blueto Shared | blueto Invalid | — | — |
blueblue: transition requires sending message on bus
example: write while Shared
example: hear write while Shared
example: write while Modified
| Modified | value may be different than memory and I am the only one who has it |
| Shared | value is the same as memory |
| Invalid | I don’t have the value; I will need to ask for it |
extra states for unmodified values where no other cache has a copy
allow values to be sent directly between caches
support not sending invalidate/etc. messages to all cores
extra information for each cache block
stored in each cache
update states based on reads, writes and heard messages on bus
different caches may have different states for same block
| Modified | value may be different than memory and I am the only one who has it |
| Shared | value is the same as memory |
| Invalid | I don’t have the value; I will need to ask for it |
| from state | hear read | hear write | read | write |
| \hline{} Invalid | — | — | blueto Shared | blueto Modified |
| Shared | — | to Invalid | — | blueto Modified |
| Modified | blueto Shared | blueto Invalid | — | — |
blueblue: transition requires sending message on bus
example: write while Shared
example: hear write while Shared
example: write while Modified
modified/shared/invalid; all initially invalid; 32B blocks, 8B read/writes
Q1: final state of 0x1000 in caches?
Q2: final state of 0x2000 in caches?
\multicolumn{3c| 0x1000-0x101f}
|
\multicolumn{3c 0x2000-0x201f}
|
|||||
| action | CPU 1 | CPU 2 | CPU 3 | CPU 1 | CPU 2 | CPU 3 |
| \hline{} | I | I | I | I | I | I |
CPU 1: read 0x1000
|
S | I | I | I | I | I |
CPU 2: read 0x1000
|
S | S | I | I | I | I |
CPU 1: write 0x1000
|
M | I | I | I | I | I |
CPU 1: read 0x2000
|
M | I | I | S | I | I |
CPU 2: read 0x1000
|
S | S | I | S | I | I |
CPU 2: write 0x2008
|
S | S | I | I | M | I |
CPU 3: read 0x1008
|
S | S | S | I | M | I |
| Modified | value is different than memory and I am the only one who has it |
| Exclusive | value is same as memory and I am the only one who has it |
| Shared | value is the same as memory |
| Invalid | I don’t have the value; I will need to ask for it |
| CPU1: read | 0xA300 | |
| CPU1: write | 0xA300 | MSI: invalidate |
| CPU1: read | 0xA300 | |
| CPU2: read | 0xA300 | MSI/MESI: memory write |
| CPU2: write | 0xA300 | MSI: invalidate |