Message passing 2026-10-25
Operating-system processes communicate by sending and receiving messages. A message-passing mutual exclusion server can centralize ownership of a shared resource: clients request permission, wait for a grant, and release the resource when finished. Correctness depends on an explicit delivery and failure model; reliable delivery and compliant clients suffice for the basic ownership protocol.
Nonpreemptive strict-priority arbitration 2026-10-24
At each service decision, choose the highest-priority pending request, preserving FIFO queue order within a priority class. A running owner retains the resource until it releases it; a higher-priority arrival changes the next choice rather than interrupting current work. Two priority classes can be represented by two FIFO queues, consulting the urgent one first.
This policy preserves the ownership safety argument of a message-passing mutual exclusion server. It does not by itself give starvation freedom to lower-priority requests when higher-priority traffic can continue indefinitely. Priority is evaluated on requests known to the arbiter at the decision point; a message not yet received cannot influence that decision.
Use a message-passing mutual exclusion server with an A client sends
owner field and a FIFO queue. A request includes its client's identity. The server handles one received message at a time, and a client has at most one outstanding request. The following pseudocode assumes reliable message passing and compliant clients:owner = NONE
waiting = empty FIFO queue
forever:
(kind, client) = receive_from_any_client()
if kind == REQUEST:
waiting.push_back(client)
else if kind == RELEASE:
assert client == owner
owner = NONE
if owner == NONE and not waiting.empty():
owner = waiting.pop_front()
send(owner, GRANT)REQUEST, waits for GRANT, runs its complete animation, and sends RELEASE before making another request.The invariant proving mutual exclusion is: at most one client has received an unreturned grant, and that client is
owner. Only the final block issues a grant, and it first requires no current owner. A valid release removes that ownership. Since clients use the display only while holding a grant, simultaneous use is impossible. The FIFO queue prevents accepted requests from being overtaken by later ones. With eventual message delivery, continued server execution, and finite animations, each accepted request is eventually served; these progress assumptions are separate from the safety invariant.