Академический Документы
Профессиональный Документы
Культура Документы
CPU 0 Cache 0
CPU 2 Cache 2
Directory Memory
a) In the following you nd the initial state of the caches. Determine the entries of the directory from the local entries.
0 1 2 3
P0 I S 408 54 04 M 410 20 01 I
0 1 2 3
0 1 2 3
State
Bitvector
P2 P1 P0
b) Explicit messages are exchanged between the caches and the directory. The following table contains all messages that are exchanged. Develop a MSI state diagram for the coherency protocol. Beside processor events external messages lead to state transitions. Messages are sent as actions during state transitions.
2
Type Read Miss (RM) Write Miss (WM) Invalidate (IR) Invalidate (IN) Fetch (FE) Fetch/invalidate (FI) Data value (DA) Data write back (WB) Source Local Cache Local Cache Local Cache Directory Directory Directory Directory Remote Cache Destination Directory Directory Directory Remote Cache Remote Cache Remote Cache Local Cache Directory Content ID, Address ID, Address Address Address Address Address Data Address, Data Description
c) Complete the message sequence charts of the coherency protocol starting from the initial state. Start from the initial state for each of the sequences separately. Also update the new states of the local caches and the directory. i) Sequence 1 (P1) read 400 (P2) read 438 Local Entries Op CPU Index
State
Tag
Data
Directory Op State
Bit Vector
Cache 0
Cache 1
Cache 2
Directory
3 ii) Sequence 2
State
Tag
Data
Directory Op State
Bit Vector
Cache 0
Cache 1
Cache 2
Directory
4 iii) Sequence 3
State
Tag
Data
Directory Op State
Bit Vector
Cache 0
Cache 1
Cache 2
Directory
5 iv) Sequence 4 (P0) write 408, 7 (P2) read 408 (P0) write 408, 9 Local Entries Op CPU Index
State
Tag
Data
Directory Op State
Bit Vector
Cache 0
Cache 1
Cache 2
Directory
d) What do you think may a home directory be? How can this technique improve the performance of directory-based cache coherency.