@susgir2
Is it possible to write the above code in 2PL form?
It will cause a deadlock while attempting to perform 2PL.
Once deadlock occurs, we can use deadlock handling methods to terminate a transaction
When the transaction restarts we will have have a deadlock set of transactions on which we can apply strict 2 PL.