3: Atomicity - All-or-nothing and Before-or-after
- Page ID
- 58505
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)
- 3.2: Atomicity
- Definition of all-or-nothing atomicity and before-and-after atomicity. Examples of their use in layered applications and in concurrent threads.
- 3.3: All-Or-Nothing Atomicity I - Concepts
- Some techniques for systematically implementing all-or-nothing atomicity: algorithms for creating all-or-nothing disk storage; dividing instructions in a program into a pre- and post-commit phase; creating and implementing version histories and journal storage.
- 3.4: All-Or-Nothing Atomicity II - Pragmatics
- Logging as a technique to streamline atomicity, through separation of the reading/writing of data from the failure recovery mechanism. Includes discussion of logging protocols, logging configurations, and recovery procedures.
- 3.5: Before-Or-After Atomicity I - Concepts
- Three mechanisms for developing before-and-after atomicity, in order of allowing increasing concurrency: simple serialization, the mark-point discipline, and read-capture discipline.
- 3.6: Before-Or-After Atomicity II - Pragmatics
- Use of locks as a mechanism for providing before-and-after atomicity. Includes discussion of lock disciplines (systemwide, simple, and two-phase locking), optimizing performance (physical locking, adding lock compatibility modes), and techniques for preventing deadlock.
- 3.7: Atomicity Across Layers and Multiple Sites
- Ensuring atomicity across layers (using the two-phase commit protocol) and across multiple sites (using distributed two-phase commit). Comparison of multi-site transactions to the "dilemma of two generals."
- 3.8: A More Complete Model of Disk Failure (Advanced Topic)
- A model for masking failure caused by both system crashes and decay events, creating all-or-nothing durable storage.
- 3.9: Case Studies - Machine Language Atomicity
- Case studies of the difficulties encountered in systems that issued machine-language instruction sets without considering questions of atomicity.