15.6. Implementation of atomic operations

Figure 15.3 illustrates the essentials for implementing an atomic operation on a persistent object. When the execution causes a write to persistent store, both the old value and the new value of the data must be recorded in some form, together with the identifier of the transaction that carried out the update. This is so that if a crash occurs before the operation completes, the old value can be restored. This is sometimes referred to as rolling back the state recorded in persistent store or undoing the operation.

Figure 15.3. A potentially atomic operation invocation.

This is a very general outline of ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.