6
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. P 1 : W(x) 3 P 2 : W(x) 1 P 3 : R(x) 1 R(x) 3 R(y) 0 P 4 : W(y) 2

Processor Consistency Exercise Is this example legal or illegal under processor consistency? Explain why or why not. If possible, put your explanation

Embed Size (px)

Citation preview

Page 1: Processor Consistency Exercise Is this example legal or illegal under processor consistency? Explain why or why not. If possible, put your explanation

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

Page 2: Processor Consistency Exercise Is this example legal or illegal under processor consistency? Explain why or why not. If possible, put your explanation

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

Page 3: Processor Consistency Exercise Is this example legal or illegal under processor consistency? Explain why or why not. If possible, put your explanation

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

Page 4: Processor Consistency Exercise Is this example legal or illegal under processor consistency? Explain why or why not. If possible, put your explanation

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

Page 5: Processor Consistency Exercise Is this example legal or illegal under processor consistency? Explain why or why not. If possible, put your explanation

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

Page 6: Processor Consistency Exercise Is this example legal or illegal under processor consistency? Explain why or why not. If possible, put your explanation

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