Consider the following two transactions: T 31 : read (A); read (B); If A = 0 then B: = B + 1; write (B). T 32 : read (B); read (A); If B = 0 then A: = A + 1; write (A). Add lock and unlock instructions to transactions T 31 and T 32 , so that they observe

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?

This problem has been solved!


Do you need an answer to a question different from the above? Ask your question!
Related Book For answer-question

Database System Concepts

4th Edition

Authors: Henry F. Korth, S. Sudarshan

ISBN: 978-0072554816