Question 9333 – Transactions
November 9, 2023Question 17078 – NTA UGC NET JUNE-2023 Paper-2
November 9, 2023Question 10781 – Transactions
Consider the following two transactions: T1 and T2.
T1: read(A); read(B); if A=0 then B ← B+1; write(B); T2: read(B); read(A); if B≠0 then A ← A-1; write(A);Which of the following schemes, using shared and exclusive locks, satisfy the requirements for strict two phase locking for the above transactions?
Correct Answer: C
Question 9 Explanation:For strict 2PL the requirements are,
i) Exclusive locks should be released after the commit.
ii) No locking can be done after the first unlock.
(A) Wrong because to write x you need Exclusive Lock.
(B) Wrong because violating the 1st requirement.
(C) Correct.
(D) Wrong because violating the 1st requirement.
Subscribe
Login
0 Comments