research29 min studyLesson 973 in Engineering

State the scheduling assumptions that make progress possible

Distinguish safety, liveness, weak fairness, and strong fairness using an explicit starvation cycle rather than an optimistic scheduler story.

On this page

What you’ll understand

  • Explain finite safety violations and infinite nonprogress behaviors.
  • Distinguish continuous enabling from infinitely repeated enabling.
  • Identify environmental assumptions that scheduler fairness cannot replace.

A service can preserve every allocation invariant by doing nothing forever. Safety rules out forbidden behavior; liveness requires specified progress along allowed infinite behaviors. To connect them, the specification may assume fair scheduling, eventual communication, or recovery. These assumptions are part of the claim. Adding fairness merely because it removes an inconvenient counterexample can hide a genuine starvation mechanism or require cooperation that the implementation and environment never promised.

A finite pause is not the same as infinite starvation

A safety violation has a finite bad prefix: once two mutually exclusive commitments have occurred, later behavior cannot erase that fact. A pure liveness violation instead needs an infinite behavior in which the required progress never occurs. A long pending request is suspicious, but without a deadline or additional assumptions its finite waiting prefix can still be extended by eventual completion. Model checkers can represent infinite nonprogress through a reachable cycle or stuttering suffix when the finite state graph and temporal conditions permit that behavior.

Define whose progress matters. Fairness of an action that serves some request does not imply fairness for each particular request. An implementation can repeatedly serve newer requests while one older request remains pending. Per-request or per-process assumptions can express a stronger requirement, but they need an implementation argument. Likewise an enabled transition is one whose guard permits a nonstuttering step in the chosen variable tuple. An action that merely leaves those variables unchanged does not count as the substantive progress required by a nonstuttering fairness condition.

WF⁡(A):(∃t0 ∀t≥t0: EA(t))⇒(∀u ∃t≥u: At)\operatorname{WF}(A):\quad \bigl(\exists t_0\ \forall t\geq t_0:\ E_A(t)\bigr)\Rightarrow\bigl(\forall u\ \exists t\geq u:\ A_t\bigr)
Along one infinite discrete behavior, E_A(t) means a nonstuttering A-step is enabled at state index t, and A_t means such a step occurs there. This weak-fairness condition forbids permanently ignoring an action that stays enabled from some point onward. Indices are steps, not seconds.↔ Scroll wide equations horizontally.

Intermittent availability separates weak and strong fairness

Weak fairness excludes endless neglect when an action remains continuously enabled. It does not exclude a schedule that repeatedly disables that action before choosing it. Strong fairness rules out endless neglect when the action is enabled infinitely often, even if enabling is intermittent. Consider a ready flag that toggles forever while Process is enabled only when ready is true. A schedule containing only toggles can satisfy weak fairness for Process because readiness never becomes permanent; it violates strong fairness because Process has infinitely many opportunities and never runs.

Stronger fairness is not automatically a better or more realistic model. A scheduler may have no mechanism that guarantees selection during intermittent opportunities. Network delivery, lock ownership, admission, and process scheduling can each have different assumptions. When a claim needs strong fairness, identify which component enforces the required recurring opportunity and selection behavior. If the action becomes permanently disabled because a request is lost or a node never recovers, neither weak nor strong fairness of that disabled action forces completion. The environment must supply the missing possibility.

SF⁡(A):(∀u ∃t≥u: EA(t))⇒(∀u ∃t≥u: At)\operatorname{SF}(A):\quad \bigl(\forall u\ \exists t\geq u:\ E_A(t)\bigr)\Rightarrow\bigl(\forall u\ \exists t\geq u:\ A_t\bigr)
Strong fairness requires infinitely many nonstuttering A occurrences whenever A is enabled infinitely often along the infinite behavior. This uses the same enabling and step-index conventions as weak fairness. Neither formula specifies a finite response-time bound.↔ Scroll wide equations horizontally.

Progress assumptions need separate evidence from safety

A replicated service can remain safe during a permanent partition while losing progress for some clients. A liveness theorem might therefore assume a sufficiently connected period, eventual message delivery, a live quorum, and scheduling conditions. State these premises before the conclusion, and distinguish them from probabilistic availability estimates. A fairness theorem also does not bound latency: an action can be delayed for any finite duration and still eventually occur. A finite deadline needs an explicit clock and quantitative execution assumptions in addition to eventual scheduling.

The Markov instrument offers a visible two-state cycle. Reset, set p=1 and q=1, predict state-one probability one after one transition and zero after two, then take two Steps. It starts entirely in state zero and alternates deterministically; each Step advances one transition. This exact distribution model does not contain a scheduler, Process action, or fairness checker. Its repeated states make a cyclic nonprogress illustration possible, but proving that a service cycle violates a liveness requirement requires the service's own actions, enabling conditions, and fairness assumptions.

An infinite toggle cycle can starve an intermittently enabled action

Ready starts true. Toggle flips Ready, while Process is enabled only when Ready is true and would increment a processed counter. The counter starts zero. Consider the infinite behavior that executes Toggle forever and never Process. Inspect the first six transitions and classify weak and strong fairness for Process.

  1. The six source states alternate ready values true,false,true,false,true,false. Process is enabled in three of those six states, but the chosen action is Toggle each time and the processed counter remains zero.

  2. Repeating the two-step cycle makes Process enabled infinitely often, yet never continuously enabled from some point onward. Weak fairness for Process therefore does not exclude this behavior.

  3. Strong fairness does exclude it: its infinitely-often-enabled premise holds, while the requirement for infinitely many Process occurrences fails. This is an infinite-cycle argument, not a conclusion drawn from a six-step delay alone.

The result

The starvation behavior distinguishes intermittent from continuous enabling. Assuming strong fairness would remove it only if that assumption matches the intended system.

Explore the model

Interactive lab

Interactive lab · markov

A repeated state cycle needs a progress interpretation

Reset, set p=1 and q=1, predict P(state 1)=1 after one transition and 0 after two, then take two Steps. The initial distribution is state 0 and each Step advances one transition. This exact alternating chain has no scheduler, enabled service action, or fairness verification; the lesson's toggle counterexample is a separate state-machine argument.

A repeated state cycle needs a progress interpretationExact finite-step probabilities for a two-state chain starting in state 0, not sampled trajectories. Playback advances two transitions per second. When p = q = 0 every distribution is stationary; when p = q = 1 the chain alternates forever. A single zero transition creates an absorbing state. Current readings: P(state 1) at step 0: 0%; Stationary P(state 1): 60%; Chain behavior: Monotone convergence. All parameters are adjustable with the labeled controls below.Two-state Markov distribution after 0 steps: state zero probability 1, state one probability 0.Initial distribution (1, 0) · step 0p = 0.3q = 0.201100%0%1−p1−qP(0)P(1)Monotone convergence
P(state 0)P(state 1)Stationary distribution
P(state 1) at step 0
0%
Stationary P(state 1)
60%
Chain behavior
Monotone convergence
t = 0 s

Exact finite-step probabilities for a two-state chain starting in state 0, not sampled trajectories. Playback advances two transitions per second. When p = q = 0 every distribution is stationary; when p = q = 1 the chain alternates forever. A single zero transition creates an absorbing state. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forRepeated states can encode infinite behavior, while fairness depends on which actions remain possible.

Check your understanding

An action is enabled infinitely often but never remains enabled forever after any point. Which fairness condition requires it to occur infinitely often?

Try it yourself

A pending request's Complete action is continuously enabled from step ten onward but never occurs. Another request's Complete action is enabled only at even steps forever and never occurs. Which behaviors violate weak fairness, and which violate strong fairness?

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Test each enabling pattern against both infinite-behavior premises.

Compare with the solution

The continuously enabled action violates both weak and strong fairness when never selected. The even-step-only action need not violate weak fairness because it is repeatedly disabled, but it violates strong fairness. These conclusions concern the named actions individually; fairness of an aggregate action serving some request would not automatically establish either request's completion.

Take it with you

  • Safety and eventual progress impose different obligations on behaviors.
  • Weak fairness concerns eventual continuous enabling; strong fairness concerns infinitely recurring enabling.
  • Fairness needs realistic environmental and scheduling premises and gives no finite deadline by itself.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.