Describe the recovery procedure if a cohort or coordinator crashes at the following states within the two-phase commit protocol:

a. Before the coordinator sends the prepare message
b. After a cohort has voted but before the coordinator has decided commit or abort
c. After the coordinator has decided to commit but before the cohort has received the commit message
d. After the cohort has committed, but before the coordinator has entered the completion record in the log


a. The transaction aborts.
b. If the coordinator crashes, when it recovers, it aborts the transaction. If a cohort crashes, when it recovers, it contacts the coordinator to find out the status
c. If the coordinator crashes, when it recovers, it resends commit messages to all the cohorts. If a cohort crashes, when it recovers, it contacts the coordinator to find out the status
d. If the coordinator crashes, when it recovers, it resends commit messages to all the cohorts. If a cohort crashes, when it recovers, it does nothing — it has already committed.

Computer Science & Information Technology

You might also like to view...

Which statement is true when a base class has protected instance variables?

a) A derived class object can assign an invalid value to the base class’s instance variables, thus leaving the object in an inconsistent state. b) Derived class methods are more likely to be written so that they depend on the base class’s data implementation. c) We may need to modify all the derived classes of the base class if the base class implementation changes. d) All of the above.

Computer Science & Information Technology

Used toner cartridges, obsolete or broken hardware, and discarded CDs, DVDs, and other storage media are referred to as _________. A. system dispose B. e-dump C. electronic compost D. computing refuse

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

The strncmp() function and the strncasecmp() function contain a third argument specifying the ____________________ of characters to compare in the string.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

The function prototype double mySqrt(int x);

a) defines a function called mySqrt which takes an integer as an ar-gument and returns a double b) defines a function called double which calculates square roots c) defines a function called mySqrt which takes an argument of type x and returns a double (d) defines a function called mySqrt which takes a double as an ar-gument and returns an integer

Computer Science & Information Technology