Assuming that strict two-phase locking is in use, describe how the actions of the two-phase commit protocol relate to the concurrency control actions of each individual server. How does distributed deadlock detection fit in?

What will be an ideal response?


Each individual server sets locks on its own data items according to the requests it receives, making transactions wait when others hold locks.
When the coordinator in the two-phase commit protocol sends the doCommit or doAbort request for a particular transaction, each individual server (including the coordinator) first carries out the commit or abort action and then releases all the local locks held by that transaction.

(Workers in the uncertain state may hold locks for a very long time if the coordinator fails)

Only transactions that are waiting on locks can be involved in deadlock cycles. When a transaction is waiting on a lock it has not yet reached the client request to commit, so a transaction in a deadlock cycle cannot be involved in the two-phase commit protocol.
When a transaction is aborted to break a cycle, the coordinator is informed by the deadlock detector. The coordinator then sends the doAbort to the workers.

Computer Science & Information Technology

You might also like to view...

Which of the following statements are true?

a. Recursive methods run faster than non-recursive methods. b. Recursive methods usually take more memory space than non-recursive methods. c. A recursive method can always be replaced by a non-recursive method. d. In some cases, however, using recursion enables you to give a natural, straightforward, simple solution to a program that would otherwise be difficult to solve.

Computer Science & Information Technology

A variable known only within the method in which it’s declared is called a(n) ____________

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

Computer Science & Information Technology

All of the following statements are TRUE regarding variance EXCEPT:

A) The higher the variance calculation the more dispersed the data set. B) Variance is most useful because its value is in the same unit as the median and therefore easier to interpret. C) Variance provides a more accurate picture of the dispersion of a data set than a range. D) Due to the way variance is calculated, the value is not in the same units as the mean.

Computer Science & Information Technology

The ruler is hidden by default. To display it, you can click the View tab on the Ribbon, and then, in the ____, click the Ruler check box.

A. Show group B. Ruler C. Font group D. Ribbon

Computer Science & Information Technology