Homework 4

This assignment is intended to help you study for the final exam.  It will not be graded (i.e., you need not turn anything in).

 

Assumption: all variables originally hold the value 0.

 

1. Consider the following sequence of operations:

P1: W(x)1        W(x)3

P2:                   W(x)2

P3:                               R(x)3 R(x)2

P4:                               R(x)2 R(x)3

Is this execution causally consistent? Add or modify an event to change the answer.

 

2. Consider the following sequence of operations:

P1: W(x)1                    W(x)3

P2:                   R(x)1                          W(x)2              R(x)1

Is this execution sequentially consistent? Add or modify an event to change the answer.

 

3. Consider the following sequence of operations:

P1: W(x)1                    W(x)3

P2:                   R(x)1                           R(x)1               R(x)3

Is this execution strictly consistent? Add or modify an event to change the answer.

 

4. Consider the following sequence of operations:

P1: W(x)1                    W(x)3

P2:                   R(x)1                           W(x)2              R(x)3

P3:                                                                               R(x)3               R(x)1

Is this execution causally consistent? Add or modify an event to change the answer.

 

5. Consider the following sequence of operations:

P1: W(x)1        W(x)3              S                                  S                                  R(x)3

P2:                   S                                  R(x)3                           W(x)2 S

Is this execution weakly consistent? Add or modify an event to change the answer.

 

6. Consider the following sequence of operations:

P1: W(x)1        W(x)3              S

P2:                                           R(x)3   S                      R(x)1

Is this execution weakly consistent? Add or modify an event to change the answer.

 

7. Consider the following sequence of operations:

P1: W(x)1                                W(x)3

P2:                   R(x)1                           W(x)2              R(x)3

Is this execution sequentially consistent? Add or modify an event to change the answer.

 

8. Consider the following sequence of operations:

P1: W(x)1        R(x)2               W(x)3

P2: W(x)2        R(x)1               W(x)4 R(x)4               R(x)3

P3:                                                       R(x)3               R(x)2

Is this execution causally consistent? Add or modify an event to change the answer.

 

9. Consider the following sequence of operations:

P1: L                W(x)1              W(x)3 U

P2:                                           L          R(x)3               U         R(x)1

Is this execution release consistent? Add or modify an event to change the answer.

.