Concurrency Control¶
Coordinate simultaneous processes so they can proceed in parallel without corrupting shared state, over-claiming shared resources, or blocking one another indefinitely.
The Diagnostic Story¶
Symptom: Multiple actors are working at the same time on the same resources or shared state, and the results depend on who gets there first. Updates overwrite each other silently, the same resource gets claimed twice, contradictory decisions are both applied, and occasional deadlocks freeze progress entirely. Whether an action succeeds or corrupts something has become a matter of timing rather than logic.
Pivot: The source of the problem is that parallel activity without coordination exposes shared surfaces to interference. The structural move is to map the shared surfaces, classify where conflict can occur, and apply the weakest sufficient combination of partitioning, ordering, isolation, or admission control that preserves safe parallel progress—not eliminating concurrency but making it governable.
Resolution: Shared state stays internally consistent and shared resources are not double-allocated. Parallel progress continues wherever conflict is absent, and where conflict occurs it is resolved through visible, accountable rules rather than timing luck. Contention hot spots become observable rather than mysterious.
Reach for this when you hear…¶
[database engineer] “We had two transactions both read the same inventory count as 1, both decided to sell it, and now we've oversold a product that doesn't exist.”
[clinical scheduling] “Three coordinators can all see the same open slot and book it simultaneously—we need the system to lock a slot the moment someone starts filling it in.”
[budget operations] “Two departments both drew from the contingency fund at the same time and neither knew the other had; the total exceeded the reserve before anyone noticed.”
When This Archetype Applies¶
Complete catalog groundingAt least one sufficient condition set is fully represented by existing primes or domain-specific abstractions.
Diagnostic problem
Simultaneous actors, processes, teams, or workflows can interfere with one another while accessing shared resources or changing shared state. Without coordination, outcomes depend on accidental timing, duplicate work, hidden overwrites, resource overcommitment, inconsistent decisions, or mutual blocking.
What this problem means
The structural problem is that useful overlap can become unsafe overlap. Multiple actors may each behave reasonably from their local perspective while collectively producing a wrong state. One team updates a record while another acts on the old version. Two services sell the same inventory. Two maintainers lock different resources and then wait forever for the other resource. Two writers overwrite each other’s edits. A committee tries to amend, vote, and debate at the same time, leaving no one sure what decision was actually made.
The shared surface may be obvious, such as a database record or a physical machine. It may also be hidden, such as customer trust, approval authority, budget availability, downstream capacity, or the meaning of a shared artifact. Hidden shared state is why concurrency failures often surprise people: the actors thought they were working independently, but their actions met downstream.
The underlying tension is speed versus integrity. Parallelism improves responsiveness and throughput, but the contested part of the system needs a rule strong enough to preserve correctness, safety, fairness, and accountability.
Show the applicability expression
Applicability expression3 distinct conditions
groundedpartly groundedopen
3 conditions, all required.
3Required in every casenumbered 1–3
These hold no matter which pattern applies.
Simultaneous actors · grounded · any one of 2
Multiple processes or actors are active simultaneously.
The source archetype describes the situation as follows: Simultaneous activity exists. The normalized requirement above isolates the load-bearing portion used in this condition set.
Shared-state conflict · grounded · any one of 2
Concurrent activities share a resource or state whose access can conflict.
The source archetype describes the situation as follows: Shared resource or state exists. The normalized requirement above isolates the load-bearing portion used in this condition set.
Outcome-sensitive interleaving · grounded
Uncontrolled interleaving of concurrent actions changes the result.
The source archetype describes the situation as follows: Interleaving affects outcome. The normalized requirement above isolates the load-bearing portion used in this condition set.
Other requirements and context (2)
Why these sit outside the expression
Supporting context — it may accompany or help interpret the situation, but it is not a load-bearing condition in a sufficient diagnostic set.
Solution feasibility — it describes whether the intervention can work, not whether the diagnostic problem exists.
Supporting contextConflict cost is material.
The source states: Conflict cost is material. The normalized contextual consideration is: Conflict cost is material. It helps interpret the situation or strengthens the practical case for examining the archetype.
Solution feasibilityCoordination rule can be enforced.
The source states: Coordination rule can be enforced. The normalized feasibility condition is: Coordination rule can be enforced. It identifies something that must be possible or available for the intervention to be workable.
Coverage
3 of 3 conditions grounded.
Mechanisms / Implementations¶
- Collaborative Editing Protocol: Lets several people edit one live document at once without silent overwrite by stamping every change against a revision and weaving non-conflicting edits together while surfacing real clashes as prompts.
- Deadlock Timeout and Detection: Keeps a set of resource holders from waiting on each other forever by bounding each wait with a timeout and spotting wait-for cycles, then aborting one holder so the rest make progress.
- Facilitated Turn-Taking: Keeps a group's overlapping contributions coherent by having someone allocate whose move comes next, so improvisation stays collision-free and builds on itself instead of fragmenting.
- Merge Conflict Review: Takes two already-made, incompatible parallel changes to one artifact, classifies the kind of clash, and applies a rule to decide which reconciled version is accepted — preserving both intents on the record.
- Mutex or Lock: Admits exactly one holder at a time to a marked-off region of work, forcing everyone else to wait, so a shared surface is never touched by two actors mid-update.
- Optimistic Concurrency Check: Lets writers proceed without locks by stamping each record with a version and rejecting any write whose expected version no longer matches — catching the lost update instead of preventing it.
- Ownership Assignment Matrix: Pre-assigns each shared surface to a single authorized owner in a standing grid, so parallel actors know which surfaces are theirs and contention is designed away before anyone acts.
- Reservation Calendar: Turns simultaneous claims on a scarce resource into non-overlapping booked time windows recorded in one shared ledger, so a booking check refuses a clash before it happens.
- Semaphore or Permit System: Hands out a fixed number of interchangeable permits and makes late arrivals wait until one is returned, capping how many actors use a constrained pool at once.
- Transaction Isolation: Defines which concurrency anomalies a multi-operation transaction is protected from by naming an isolation level and the set of interleavings it rules out.
Related Abstractions¶
Abstractions this archetype builds on — directly (a source ingredient) or as a related pattern. Links follow the typed catalog namespace.
Built directly on (3)
- Concurrency: Manage simultaneous processes.
- Resource Management: Allocation of finite assets.
- Transaction: All-or-nothing operations.
Also references 10 related abstractions
- Commutativity: Order of inputs does not affect output.
- Constraint: Limits possibilities to guide outcomes.
- Data Integrity: Accuracy and consistency preserved.
- Deadlock: Mutual blocking processes.
- Idempotence: Repetition yields same result.
- Observability: Infer internal state externally.
- Order: Defines ranking or sequencing relationships.
- Procedural Fairness (Due Process): Due process.
- State and State Transition: Captures system condition and evolution.
- Task Interdependence: Tasks rely on each other.
Variants¶
Narrower or domain-specific specializations that share this archetype's core structure. Recognized variants are established; candidate variants are provisional.
Conflict-Free Parallelism · subtype · merge review
Structure work so parallel actions do not contend for the same state, resource, or decision surface.
Race Condition Prevention · risk or failure variant · candidate
Prevent outcomes from depending on accidental timing between concurrent actions.
Serialized Access Coordination · subtype · recognized
Make a contested resource safe by routing access through an explicit sequence.
Optimistic Concurrency Control · implementation variant · recognized
Allow concurrent work to proceed tentatively, then validate before committing or require retry when conflicts appear.
Collaborative Concurrency Protocol · domain variant · recognized
Coordinate simultaneous human work on shared artifacts, decisions, spaces, or responsibilities.
Editorial Notes¶
Problem Classification¶
Classification: Coordination, Dependency & Sequencing Failure → Concurrent Shared-State Consistency
Problem kernel: simultaneous actors corrupt shared resources and state
Rationale: Accidental interleaving causes overwrites, duplicate work, overcommitment, and inconsistent observations without an explicit concurrency contract.
Independent corroboration: The earliest necessary condition in the frozen evidence is: Simultaneous actors, processes, teams, or workflows can interfere with one another while accessing shared resources or changing shared state. That is a concurrent shared state consistency problem because Independently acting participants produce conflicting, partial, or irreconcilable states because simultaneous and distributed changes lack an explicit consistency and convergence contract.
Review outcome: Independent reviewer agreement; high confidence.