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. ...

Get Operating Systems: Concurrent and Distributed Software Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.