Consider the following two transactions: T 31 : read (A); read (B); If A = 0 then

Question:

Consider the following two transactions:

T31: read (A); read (B);

If A = 0 then B: = B + 1; write (B).

T32: read (B); read (A);

If B = 0 then A: = A + 1; write (A).

Add lock and unlock instructions to transactions T31 and T32, so that they observe the two-phase locking protocol. Can the execution of these transactions result in a deadlock?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Database System Concepts

ISBN: 978-0072554816

4th Edition

Authors: Henry F. Korth, S. Sudarshan

Question Posted: