Explain why this protocol prevents a global deadlock among transactions.

The kill-wait concurrency control of Exercise 20.32 is based on locking. When it is used in a distributed system, it is referred to as the wound-wait protocol. We assume that a distributed transaction uses RPC to communicate among cohorts so that when the two-phase commit protocol starts, all cohorts have completed. The kill primitive is replaced by a wound primitive.
If the cohort of transaction, T1, at some site makes a request that conflicts with an operation of the cohort of an active transaction, T2, at that site, then
if TS(T1) < TS(T2) then wound T2 else make T1 wait
where wound T2 means that T2 is aborted (as in the kill-wait protocol), unless T2 has entered the two-phase commit protocol, in which case T1 waits until T2 completes the
protocol.

What will be an ideal response?


Since RPC is the mode of communication, when T2 has entered the two-phase commit protocol, it has completed at all sites and therefore is not waiting for resources held by T1 (or any other transaction) at any site. Because the protocol is based on locking,
once a transaction enters the two-phase commit protocol it will complete (assuming no failures). Therefore a deadlock is not possible among active transactions.

Computer Science & Information Technology

You might also like to view...

By default, Word sets page margins at ____ from the top, bottom, left, and right sides of the page.

A. .5 inches B. 1 inch C. 1.25 inches D. 1.5 inches

Computer Science & Information Technology

Move your pointer over the Data Table list arrow to deselect legend keys.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

An application that supports a front-end program sometimes is called which of the following?

A. back end B. RDBMS C. GUI D. collaborative database

Computer Science & Information Technology

Which of the following is not one of the four security levels of incidents?

A. disasters B. false alarms C. minor incidents D. virus epidemics

Computer Science & Information Technology