Consider the following atomic commit protocol that attempts to eliminate the blocking that occurs in the two-phase commit protocol. The coordinator sends a prepare message to each cohort containing the addresses of all cohorts. Each cohort sends its vote directly to all other cohorts. When a cohort receives the votes of all other cohorts it decides to commit or abort in the usual way.
a. Assuming no failures, compare the number of messages sent in this protocol and in the two-phase commit protocol. Assuming that all messages take the same fixed amount of time to deliver, which protocol would you expect to run faster? Explain.
b. Does the protocol exhibit blocking when failures occur?
a. Assume there are n cohorts. The two-phase commit protocol uses 4n messages and takes 4 message times. The newprotocol uses n prepare messages plus n(n ? 1) vote messages for a total of n2 messages and takes 2 message times
b. Yes. If a cohort that has voted ready does not get a vote from another cohort, it is blocked.
You might also like to view...
Which of the follow in NOT a Normal view pane?
A) Notes B) Slide C) Left hand D) Right hand
Which of the following statements is false?
a. An app can have many activities, and an Activity can manage multiple Frag-ments. b. You interact with an Activity through views—GUI components that inherit from class View (package android.view). c. Before Android 3.0, a separate Activity was typically associated with each screen of an app. d. On a tablet, each Fragment typically occupies the entire screen and the Activity switches between the Fragments, based on user interactions.