Quiz on 2PL

Let's test our understanding of the two-phase locking mechanism.

Question 1

Consider a transaction with the following operations: read[a]write[b]commitread[a] \rightarrow write[b] \rightarrow commit, follows this schedule for its execution: readlock[a], read[a], readunlock[a], writelock[b], write[b], writeunlock[b].readlock[a],\ read[a],\ readunlock[a],\ writelock[b],\ write[b],\ writeunlock[b].

Based on your understanding of the basic rules of 2PL, does the schedule above follow those rules?

Show Answer
1 of 3

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.