20.7. Summary
We have been concerned with methods of implementing transactions in the presence of concurrency and, in particular, with ensuring the property of serializability for correct execution. Three approaches were considered: locking, time-stamping and optimistic concurrency control.
The object model set up in Chapter 19 was used again here. To implement the locking methods of concurrency control the object was extended with lock and unlock operations. These were assumed to be invoked by a transaction manager or other agency with knowledge of all the locks held and requested by a transaction. Deadlock detection was shown to be necessary.
Two-phase locking guarantees a serializable schedule of the operation invocations of concurrent transactions. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access