Two-Phase Locking (2PL)
2PL:
- If T wants to read an object, first obtains an S lock.
- If T wants to modify an object, first obtains X lock.
- If T releases any lock, it can acquire no new locks!
Locks are automatically obtained by DBMS.
Guarantees serializability!