Question: A locking algorithm is based on transaction ID and works in the following way. Assume transactions are all assigned an integer as an ID (

A locking algorithm is based on transaction ID and works in the following way. Assume transactions are all assigned an integer as an ID (e.g., transaction 1,2,3...). A lock can be obtained by a transaction if either no other transaction is holding it, or if the transaction that is holding it has a lower ID number. In the latter case, if the transaction with the higher ID tries to obtain the lock it causes the transaction with the lower ID to unlock it, and the transaction with the higher ID obtains it.
Try to run the strict two-phase locking protocol with this lock. Does it guarantee serializability? If not, provide an example of a schedule that is not serializable using this locking mechanism.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!