Ordering, Races, and Atomicity
Ordering model
Rule |
Requirement |
|---|---|
|
Each channel provides FIFO ordering per source–destination pair: messages sent from one endpoint to another on one channel are delivered in the order sent, without loss or duplication. |
|
There is no ordering guarantee across channels, and no ordering guarantee between messages of different core–CM pairs. In particular, an A-channel message and a B-channel message in flight at the same time between the same two endpoints may be observed in either order — this is the origin of every race in this chapter. |
|
There is no per-address ordering beyond what
|
Useful consequences of PL-ORD-01:
A core never observes an
Invalidatefor a line before theGrantthat gave it that line: both travel CM → core on channel B, and the CM serializes per line, so the grant is always sent first.A
Nacksent after anInvalidateto the same core arrives after it (exploited by rulePL-CM-07).A forced
WriteBackand a subsequentInvAckfrom the same core arrive at the CM in that order.
Because there is no GrantAck/completion message (unlike TileLink’s channel E), these FIFO properties are what make grants unambiguous: the CM updates its directory at the moment it sends a grant, and FIFO delivery guarantees the core’s view catches up before any later B-channel message for that line arrives.
Atomicity
Rule |
Requirement |
|---|---|
|
The CM’s processing of one transaction for one line
(directory read, invalidations, memory access, directory update, grant) is
atomic with respect to other transactions for that line ( |
Race conditions
A race is any situation where messages in flight on opposite channels (or from different cores) refer to the same line. PicoLink defines exactly five architecturally visible races and their mandatory resolutions.
Race 1: Dual Upgrade
Two cores both hold a line in S and issue Upgrade concurrently.
Rule |
Requirement |
|---|---|
|
The CM shall serve exactly one |
See the corresponding diagram in Message Sequence Diagrams.
Race 3: Invalidate crosses Upgrade
A core in S issues Upgrade. Before the Upgrade reaches the CM
(or before the CM serves it), the CM — serving another core’s request —
sends Invalidate for the same line. The two messages cross in flight.
Rule |
Requirement |
|---|---|
|
A core that receives |
Note
The core cannot simply “cancel” the Upgrade — it is already in
flight and will be serviced. Rule PL-RACE-03 guarantees both sides
independently reach the same conclusion: the core expects a Nack,
and the CM produces one.
Race 4: Voluntary WriteBack crosses Invalidate
A core evicts an M line, sending a voluntary WriteBack. Before the
WriteBackAck returns, the CM — serving another core’s request for that
line — sends Invalidate to the (former) owner. The two messages cross.
Rule |
Requirement |
|---|---|
|
The core, now in
In both sub-cases exactly one dirty payload reaches memory, the core ends
in |
Race 5: Invalidate to a silently evicted line
A core silently evicts a clean line (S → I or E → I,
PL-MESI-04). The directory still lists the core, so a later transaction
causes the CM to send it an Invalidate for a line it no longer holds.
Rule |
Requirement |
|---|---|
|
The core shall respond |
Deadlock freedom
Protocol-level dependencies form chains such as:
Core1 ReadExclusive → CM Invalidate to Core0 → Core0 InvAck → CM GrantE to Core1
Deadlock freedom follows from three properties, each normative elsewhere in this specification:
Unconditional sinking — cores always accept channel B, the CM always accepts channel A, regardless of their own stalled traffic (
PL-DEP-01,PL-DEP-02).Bounded outstanding transactions — per-line single outstanding request per core (
PL-CHAN-02) and finitetxn_idpools bound all queues.Acyclic dependency — every chain has the shape request → (invalidations → acknowledgments) × N → grant; responses never wait on new requests, so chains terminate.