Three robot workflow services can each hold a valid exclusive resource reservation while all three stop making progress. Every ownership rule can remain intact: no resource has two owners, yet each service is waiting for another service to release something.

This is a coordination problem about logical software resources. The original model below uses names for planning records, image archives, and export slots. It does not reserve physical robot space, control motion, or prescribe a protective interlock.

The question is specific: how does a cycle of waiting arise, and why can a single strict acquisition order exclude that cycle under stated assumptions?

Define a small resource system

Let R10 represent a logical planning-record lock, R20 an image-archive lock, and R30 a report-export lock. Each has capacity one and uses exclusive ownership. A request waits if another task owns the requested resource.

Tasks retain resources already acquired while waiting for their next resource. They release their held resources after completing their modeled work. Assume no lock upgrades, recursive acquisitions, forced revocations, task failures, or external waits within the example.

The numeric suffixes are stable ordering keys for the resources. They are unrelated to robot priorities, timestamps, physical locations, or expected processing durations.

Initially all three resources are free. Define task A to request R10 followed by R20; task B to request R20 followed by R30; and task C to request R30 followed by R10.

Construct the waiting cycle

First A acquires R10. Next B acquires R20. Then C acquires R30. Each acquisition succeeds because its resource was free.

A now requests R20 and waits for B. B requests R30 and waits for C. C requests R10 and waits for A. Under the stated rule, each retains its first resource while waiting for its second.

No task can reach its completion-and-release step. A cannot finish until B releases R20; B cannot finish until C releases R30; C cannot finish until A releases R10. The dependency closes on itself.

An ownership display showing one holder per resource would not reveal a conflicting double assignment. The failure is in the combined waiting relationship, not in the exclusivity rule considered one resource at a time.

Read the graph carefully

Define a task wait edge from a waiting task to the current holder of the resource it wants. The current edges are A to B, B to C, and C to A.

For this fixed single-instance, exclusive-resource model, that closed cycle identifies the declared deadlock. The assumptions matter: multiple resource instances, nonblocking requests, and other forms of synchronization require a different analysis.

A dependency observed across separate histories can indicate a possible bad order without establishing that all corresponding tasks are currently waiting. A live wait graph and a historical lock-dependency graph answer related but different questions.

PostgreSQL's explicit-locking documentation describes deadlock and consistent acquisition order. The Linux kernel's lockdep design documentation explains inverse lock dependencies and longer dependency circles. These references motivate the model; they do not establish that either system observes this hypothetical robot workflow.

Require increasing resource order

Now require every task to acquire all needed resources in increasing numeric order. A still requests R10 then R20. B still requests R20 then R30. C must change to R10 then R30.

Consider one possible interleaving. A acquires R10, and B acquires R20. C requests R10 and waits while holding nothing. A requests R20 and waits for B. B can acquire the free R30, perform its modeled work, and release both resources.

A can then obtain R20, finish, and release R10 and R20. C can obtain R10 and then R30 and finish. Waiting occurs, but the three-task cycle has disappeared in this interleaving.

The policy is stronger than choosing an order privately inside each function. All participants that share these resources must apply the same stable comparison rule. Otherwise C's old R30-then-R10 path can recreate the cycle.

Why the strict order excludes a cycle

Suppose, for contradiction, that a resource-holding cycle exists while every task follows the increasing-order rule. Each task on the cycle owns a resource that its predecessor wants and is waiting to acquire the resource held by its successor.

The requested resource must rank above every resource that task already holds. Following the cycle would therefore require a strict chain of increasing ranks that eventually returns to its starting rank.

For the three-resource case, that would require some ordering equivalent to R10 less than R20, R20 less than R30, and R30 less than R10. A strict total order cannot satisfy that last return. The assumed cycle is impossible under the model.

This argument requires unique, comparable resource keys and adherence whenever additional resources are requested. Dynamically discovering a lower-ranked resource after acquiring a higher-ranked one does not satisfy the rule merely because earlier requests were sorted.

The proof has boundaries

Eliminating this circular-wait pattern does not guarantee fairness or a maximum completion time. A task could wait a long time behind other tasks, or hold a resource indefinitely because its own processing never completes.

An unmodeled wait can also break the reasoning. If a task holds R30 while waiting for a callback that needs R10, the full dependency includes that callback even when the visible lock-acquisition function appears ordered.

Likewise, acquiring shared locks and later upgrading them introduces a different conflict pattern. This example deliberately assumes exclusive requests from the start. Its proof should not be extended to an upgrade protocol without analyzing those additional waits.

A timeout can end one request's wait, but progress depends on what happens to resources already held. A timer alone does not make a cycle disappear if the timed-out task retains the resource another task needs.

For a workflow record, ownership, outstanding requests, task state, and the full dependency path make the stall explainable. A consistent increasing acquisition rule then has a precise benefit: it removes a particular circular-wait mechanism while leaving timing, fairness, recovery, and physical execution as separate claims.

Sources checked October 23, 2026

PostgreSQL 17 documentation, Explicit Locking, section 13.3.4 Deadlocks:

https://www.postgresql.org/docs/17/explicit-locking.html

Linux kernel documentation, Runtime locking correctness validator, Multi-lock dependency rules:

https://docs.kernel.org/locking/lockdep-design.html

All task names, resource meanings, interleavings, and the ordered-resource proof are original hypothetical constructions. No scheduler, database transaction, or lock validator was executed.

Illustration note: The accompanying site-library robot beside a laptop is a concept illustration. It does not show a live workflow stall, physical resource reservation, or verified recovery system.