A race condition occurs when concurrent actions can be ordered in more than one way and at least one possible ordering produces an incorrect result. Correctness must be defined for the system’s intended outcome. section 1.8 section 2.2
Model each process as a sequence of atomic actions. The concurrent composition of two processes contains every possible interleaving of their actions; a race exists when some interleavings are incorrect. section 1.8
Two proposers and two acceptors
Two proposers broadcast (+2) and (×2) to acceptors initially holding 0. Because these operations are not commutative, applying them in different orders produces different results. The system therefore needs a consistent ordering so both acceptors reach the intended result. section 2.2
Figure 1.19 Reasoning about race conditions
Visualizes how alternative interleavings create correct or incorrect outcomes. section 1.8
The idea applies beyond threads updating one variable: it covers cooperative or preemptive multitasking, single- or multi-core machines, and multiple machines. Database correctness can require every interleaving to match an equivalent sequential order. section 1.8



















