Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider the sequence of memory accesses from the previous exercise as above. No

ID: 3690561 • Letter: C

Question

Consider the sequence of memory accesses from the previous exercise as above. Now, the 3 processors are connected with a point-to-point interconnect and implement a distributed shared memory with a directory-based write-invalidate cache coherence protocol. For every memory access, describe the messages that are sent on the network and the state of the block in the caches and in the directory using the following template.

Consider the following assumptions:
? A message only accommodates one address or one data word.

Home nodes for memory locations X and Y are both associated with processor P1 and that a transfer between this home memory and the P1-cache does not result in traffic on the point- to-point interconnect.

? Caches are direct-mapped and each cache block stores only one word

? Words X and Y map to the same cache block in each block (i.e. X and Y can’t co-exist in a

cache at any time).

? Memory locations X and Y are not in any of the caches at the start of the sequence

Explanation / Answer

Underline indicate   that  the  messages   are   local  
–   they   will   not   be   transmitted   by   the   interconnect   network

P1 P1 P2 P2 P2 P3 Network Network Network Dir Dir Dir Step Sta Addr Sta Addr Sta Addr Action Src-Dest Addr Addr Sta Sta{Procs} P1: Write X Excl. X WrMs P1->P1 X X Excl. P1 P1: Write X Excl X DaRp P1->P1 X P1: Read X Excl X P2: Write X Invalid X Excl. X WrMs P2->P1 X X Excl. P2 P2: Write X Invalid X Excl X Ftch/Inva P1->P1 X P2: Write X Invalid X Excl X WrBk P1->P1 X P2: Write X Invalid X Excl X DaRp P1->P2 X P3: Read X Shar X Shar X RdMs P3->P1 X X Shar. P2,P3 P3: Read X Shar X Shar X Ftch P1->P2 X P3: Read X Shar. X Shar. X WrBk P2->P1 X P3: Read X Shar. X Shar. X DaRp P1->P3 X P1: Read X Shar. X Shar. X Shar. X RdMs P1->P1 X X Shar. P1,P2,P3 P1: Read X Shar. X Shar. X Shar. X DaRp P1->P1 X P2: Write Y Shar. X Shar. Y Shar. X WrMs P2->P1 Y X Shar. P2 P2: Write Y Shar. X Shar. Y Shar. X DaRp P1->P2 Y Y Excl. P3 P1: Read Y Shar. Y Shar. Y Shar. X RdMs P1->P1 Y X Shar. P3 P1: Read Y Shar. Y Shar. Y Shar. X Ftch P1->P2 Y Y Shar. P1,P2 P1: Read Y Shar. Y Shar. Y Shar. X WrBk P2->P1 Y P1: Read Y Shar. Y Shar. Y Shar. X DaRp P1->P1 Y P2: Read X Shar. Y Shar. X Shar. X RdMs P2->P1 X X Shar. P2,P3 P2: Read X Shar. Y Shar. X Shar. X DaRp P1->P2 X Y Shar. P1