Chapter 2 — Instructions: Language of the Computer — 3 Synchronization Two processors sharing an area of memory P1 writes, then P2 reads Data race if P1 and P2 don't synchronize Result depends of order of accesses Hardware support required Atomic read/write memory operation No other access to the location allowed between the read and write Could be a single instruction E.g., atomic swap of register ↔ memory Or an atomic pair of instructions §2.11 Parallelism and Instructions: Synchronization
{}