Upload
marylou-murphy
View
212
Download
0
Embed Size (px)
Citation preview
Processor Consistency Exercise
• Is this example legal or illegal under processor consistency? Explain why or why not. If possible, put your explanation in a bulleted list.
P1: W(x) 3
P2: W(x) 1
P3: R(x) 1 R(x) 3 R(y) 0
P4: W(y) 2
Processor Consistency Exercise (cont’d)
• Explain why the specific actions are needed under processor consistency
CA
P
M
CA
P
M
CA
P
M
CA
P
M
InterconnectionNetwork
P4: W(y) 2
P2: W(x) 1
P1 P2
P3 P4
x=1
y=2
Processor Consistency Exercise (cont’d)
• Explain why the actions represented by the arrows are needed under processor consistency
CA
P
M
CA
P
M
CA
P
M
InterconnectionNetwork
CA
P
M
y=2
x=1x=3
P1 P2
P3 P4
P4: W(y) 2P2: W(x) 1P1: W(x) 3
Processor Consistency Exercise (cont’d)
• What other values could be read for x? Explain.
CA
P
M
CA
P
M
CA
P
M
InterconnectionNetwork
CA
P
M
y=2
x=1x=3
x=1
P1 P2
P3 P4
P4: W(y) 2P2: W(x) 1P1: W(x) 3P3: R(x) 1
Processor Consistency Exercise (cont’d)
• Explain why the writes were “seen” in this order by P3.
CA
P
M
CA
P
M
CA
P
M
InterconnectionNetwork
CA
P
M
y=2
x=1x=3
x=3
P1 P2
P3 P4
P4: W(y) 2P2: W(x) 1P1: W(x) 3P3: R(x) 1P3: R(x) 3
Processor Consistency Exercise (cont’d)
• For what reason(s) was P3 able to read an old value for y?
CA
P
M
CA
P
M
CA
P
M
CA
P
M
InterconnectionNetwork
y=2 x=1
x=3
x=3
y=0
P1 P2
P3 P4
y=2
P4: W(y) 2P2: W(x) 1P1: W(x) 3P3: R(x) 1P3: R(x) 3P3: R(y) 0