This approach, developed by Jim Gray, locks data and assumes that a transaction is divided into a growing phase, in which locks are only acquired, and a shrinking phase, in which locks are only released. The use of 2-phase locks is illustrated in Figure 4.
A transaction that tries to lock data that has been locked is forced to wait and may deadlock, as shown in Figure 5.