Rabu, 23 Desember 2015

Distributed System : Exercise



Chapter 13.5

The getDecision procedure defined in Figure 13.4 is provided only by coordinators. Define a new version of getDecision to be provided by participants for use by other participants that need to obtain a decision when the coordinator is unavailable.
Assume that any active participant can make a getDecision request to any other active participant. Does this solve the problem of delay during the ‘uncertain’ period? Explain your answer.
At what point in the two-phase commit protocol would the coordinator inform the participants of the other participants’ identities (to enable this communication)?

Answer.
The signature for the new version is:
getDecision (trans) -> Yes/ No/ Uncertain
The worker replies as follows:
If it has already received the doCommit or doAbort from the coordinator or received the result via another worker, then reply Yes or No;
if it has not yet voted, reply No (the workers can abort because a decision cannot yet have been reached);
if it is uncertain, reply uncertain.
This does not solve the problem of delay during the ‘uncertain’ period. If all of the currently active workersare uncertain, they will remain uncertain.
The coordinator can inform the workers of the other workers’ identities when it sends out the canCommit request.

.

1 komentar:

gestyar mengatakan...

sok sok inggris lu

Posting Komentar