CS 5204 - Fall, 2009
Problem Set 10

25 points

Assigned: November 17
Due: Thursday, December 3 (5:00PM, EST)



1. (8 points) The three phase commit protocol is guaranteed to be correct with at most one node failure. Show by an example that the protocol is not guaranteed to be correct if there are two node failures.

2. (8 points) For the version of the two phase commit algorithm presented in class (e.g., one not using a cooperative termination protocol):
(a) If the coordinator fails after receiving an AGREED or ABORT message from each cohort but before writing the COMMIT or ABORT record, which of the cohort nodes are unable to complete the protocol until the coordinator recovers: all cohorts?, only those cohorts voting COMMIT? only those cohorts voting ABORT? none of the cohorts? Explain your answer. 
(b) If a cohort fails after sending an AGREED or ABORT message but before receiving a COMMIT or ABORT message from the coordinator, which other cohort nodes are unable to complete the protocol until the failed cohort recovers: all other cohorts?, only those other cohorts voting COMMIT? only those other cohorts voting ABORT? none of the cohorts? Explain your answer. 

3. (9 points) In the three-phase commit protocol:
(a) in the coordinator, explain why a timeout in the p1 state leads to an abort action but a failure leads to a commit action.
(b) in the cohort, explain why both a timeout and a failure in the pi state lead to a commit action.