Loading learning content...
In most networking scenarios, treating all traffic equally seems fair. But what happens when a factory floor controller needs to send an emergency stop command while bulk file transfers are consuming bandwidth? Or when a stock trading system must execute a transaction within milliseconds while email traffic competes for the same network?
Token Ring's priority mechanism addresses these critical scenarios.
Unlike Ethernet's strictly best-effort approach, IEEE 802.5 defines a sophisticated 8-level priority system built directly into the protocol. This isn't an afterthought layered on top—it's fundamental to how tokens circulate and how stations gain access. The priority and reservation bits in the Access Control field work together in an elegant dance that ensures:
This page dissects the priority mechanism with the attention to detail a Principal Engineer would demand when evaluating whether Token Ring meets real-time requirements.
By the end of this page, you will understand the complete Token Ring priority system—priority levels, reservation mechanism, priority capture, and the stacking algorithm for priority restoration. You'll be able to analyze priority scenarios, calculate worst-case delays, and explain why Token Ring was preferred for time-critical applications.
Token Ring defines 8 priority levels, numbered 0 through 7, encoded in the 3-bit Priority (P) field of the Access Control byte. Priority 0 is the lowest; priority 7 is the highest.
Priority Level Guidelines:
IEEE 802.5 and IBM provide recommended priority level assignments:
| Priority | Typical Use | Description |
|---|---|---|
| 0 | Normal user data | Default priority for all regular traffic |
| 1 | Normal user data | Slightly elevated, still general purpose |
| 2 | Normal user data | Used for interactive applications |
| 3 | Normal user data | Higher interactive priority |
| 4 | Bridge traffic | Source routing bridge traffic |
| 5 | Reserved | Reserved for future use |
| 6 | Ring management | Claim Token, Active Monitor Present, etc. |
| 7 | Ring management (critical) | Beacon frames, ring recovery |
Priority in the Access Control Field:
Recall the AC field structure: PPP T M RRR
The P bits determine who may capture the token:
Rule: A station may capture the token ONLY if its priority ≥ token's P value.
Example:
Default Operation:
When no station has raised the priority, tokens circulate at P=0. All stations can capture P=0 tokens (since any priority ≥ 0), and the ring operates like a standard round-robin token ring.
When Priority Elevates:
Priority elevation occurs when a high-priority station needs to transmit:
Priorities 6 and 7 are typically reserved for ring management traffic (Beacon, Claim Token, AMP, etc.). Applications should not use these levels, even if the system allows configuration. Ring recovery depends on management frames having highest priority.
The Reservation (R) bits enable stations to request higher priority for the next token—without disrupting the current transmission. This mechanism is ingenious because it allows priority elevation to happen smoothly during normal operation.
How Reservation Works:
As a frame or token passes a station, the station can modify the R bits to request priority for its pending traffic:
Reservation Rule: A station may set R to its desired priority only if its desired priority > current R value.
This "highest wins" rule ensures:
Scenario: Token with P=0, R=0 passes three stations Station A: Has priority 2 traffic queued - Sees R=0, wants R=2 - Since 2 > 0, sets R=2 - Token now has: P=0, R=2 Station B: Has priority 5 traffic queued - Sees R=2, wants R=5 - Since 5 > 2, sets R=5 - Token now has: P=0, R=5 Station C: Has priority 3 traffic queued - Sees R=5, wants R=3 - Since 3 < 5, cannot change R - Token still has: P=0, R=5 Station D: No traffic queued - Does not modify R - Token still has: P=0, R=5 When transmitting station releases new token:- New token has P=5, R=0 (priority matches highest reservation)- Only priority 5+ stations can now capture- Station B can transmit; Stations A, C must waitWhen Does Reservation Apply?
Reservations are made while a frame is circulating or while a station forwards a token it cannot capture. The key opportunities are:
Reservation in the Returning Frame:
When a transmitting station receives its frame back, the R field may contain reservations from other stations. When releasing the new token:
New_Token_P = max(Original_P, Reservation_R)
New_Token_R = 0
This ensures the reservation is honored—the new token has priority elevated to match the highest reservation.
Competing Reservations:
If multiple stations reserve simultaneously with identical priorities:
This maintains fairness within priority levels—elevated priority doesn't guarantee which high-priority station wins, just that only high-priority stations compete.
Reservations don't interrupt current transmissions. If a priority-7 station makes a reservation while a priority-0 station is transmitting, the priority-0 station completes its entire frame. Only the NEXT token is elevated. This prevents mid-frame preemption, which would corrupt transmissions.
Let's trace through a complete priority operation scenario to see how all the pieces fit together. Understanding this flow is essential for analyzing Token Ring behavior under load.
Scenario Setup:
Detailed Step-by-Step:
Step 1: Initial Token Circulation
Step 2: Reservation Propagation
Step 3: Token Capture at Priority 0
Step 4: Frame Return and Token Release
Step 5: Priority-4 Token Circulation
Step 6: Station C Waits
This is the critical question! If Station B keeps transmitting P4 traffic and releasing P4 tokens, lower-priority stations could starve. Token Ring solves this with the stacking mechanism, explained in the next section.
The stacking mechanism is Token Ring's solution to priority restoration. Without it, a high-priority station could monopolize the ring by continuously releasing high-priority tokens. Stacking ensures that the station responsible for raising priority is also responsible for lowering it.
The Stacker Role:
When a station releases a token at a higher priority than it received, that station becomes a stacker for that priority raise. The stacker:
Stacking Algorithm:
When a transmitting station releases a token:
Token Release Algorithm: // After transmitting frame(s), station releases token// Sx = saved reservation value from when we captured// Sr = saved priority value from when we captured IF (my_queued_priority > 0) AND (my_queued_priority >= Sx): // I have more high-priority traffic // Release token at my priority, keep stacking New_P = my_queued_priority New_R = 0 Push (Sr, Sx) onto stack if not already done ELSE IF (Sx > Sr): // Reservation requested higher priority // Honor the reservation, become stacker Push (Sr, Sx) onto stack New_P = Sx New_R = 0 ELSE: // Normal release, check if I'm a stacker IF (stack not empty): // Pop the stack to restore priority (Sr, Sx) = Pop from stack New_P = Sr New_R = Sx ELSE: // No stacking involved, normal release New_P = Sr // Same priority as received New_R = Sx // Preserve any pending reservationsStacking Example:
Initial State: Token at P=0, Station A is transmitting
Step 1: Priority Raise to 4
Step 2: Station B Transmits at P=4
Step 3: No More P=4 Traffic
Step 4: Priority Restoration
Why Stacking Works:
The station that elevated priority is guaranteed to see the token when no higher-priority stations want it—because the token completes a full rotation. That station then restores the original priority, ensuring fairness.
Multiple Stacking Levels:
Priority can be raised multiple times (e.g., 0→3→5→7). Each raise adds an entry to the stacker's stack. As each priority level drains, the stacker pops and releases at the previous level:
Stack: [(0,0), (3,0), (5,0)]
When P=7 drains → Pop (5,0), release at P=5
When P=5 drains → Pop (3,0), release at P=3
When P=3 drains → Pop (0,0), release at P=0
If the stacker fails (station crashes), the priority restoration breaks. The Active Monitor includes timer mechanisms to detect stuck high-priority tokens and restore normal operation through ring purge. This is rare but handled.
A critical question for any priority system: Does it guarantee fairness? Specifically, can lower-priority stations be completely starved by higher-priority traffic?
Within-Priority Fairness:
For stations at the same priority level, Token Ring provides perfect fairness. The token visits each station in sequence, and each station with traffic at the current priority gets exactly one turn per rotation (limited by THT). This is strict round-robin—no station can monopolize.
Cross-Priority Fairness:
For stations at different priority levels, the answer is more nuanced:
Calculating Maximum Wait Time:
For a station at priority level k, the worst-case wait time occurs when:
Maximum Wait Time for Priority k: W_max(k) = Ring_Latency + Σ(N_i × THT) for all i > k Where:- Ring_Latency: Time for token to traverse ring- N_i: Number of stations at priority level i- THT: Token Holding Time (10 ms) Example: 100-station ring, priority distribution:- Priority 7: 2 stations (ring management)- Priority 6: 3 stations (critical control)- Priority 5: 5 stations (real-time data)- Priority 4: 10 stations (bridges)- Priority 0-3: 80 stations (user data) Ring latency: 0.3 ms (typical) Wait time for Priority 4 station:W_max(4) = 0.3 + (2 × 10) + (3 × 10) + (5 × 10) = 0.3 + 20 + 30 + 50 = 100.3 ms Wait time for Priority 0 station (worst case):W_max(0) = 0.3 + (2+3+5+10) × 10 + (80-1) × 10 = 0.3 + 200 + 790 = 990.3 ms (nearly 1 second!) If ALL high-priority stations have continuous traffic,P0 stations wait almost 1 second between transmissions.If high-priority traffic is bursty, actual waits are lower.Practical Fairness Considerations:
Bursty Traffic: Real networks have bursty traffic. High-priority stations rarely transmit continuously for extended periods. Between bursts, priority drops and lower stations transmit.
Priority Level Design: Network administrators should carefully assign priorities. Too many stations at high priority negates its value. Priorities 6-7 should be reserved exclusively for ring management.
THT Limiting: Token Holding Time bounds how long any station can transmit per token capture. Even a high-priority station must release after 10ms, allowing priority restoration to occur.
Comparison with Ethernet Priority (802.1p):
Ethernet added priority later (IEEE 802.1p/Q VLAN tagging), but it requires switch cooperation:
Token Ring's priority is integral to channel access—high-priority frames get the token first, not just favorable queuing.
For real-time systems using Token Ring, calculate W_max for each priority level and ensure it meets your latency requirements. If W_max(k) exceeds acceptable delay, either reduce higher-priority station count, reduce THT, or segment the ring.
Understanding how priority was used in real Token Ring deployments provides insight into its practical value and limitations.
Manufacturing Automation:
Factory automation was a prime use case for Token Ring priority:
The guaranteed maximum latency made Token Ring suitable for closed-loop control systems where milliseconds mattered.
Financial Trading:
Trading floors used Token Ring for deterministic transaction processing:
Medical Systems:
Patient monitoring networks used priority to ensure vital signs data was never delayed by bulk data transfers.
Practical Priority Configuration:
| Priority | Application Type | Example |
|---|---|---|
| 7 | Ring recovery only | Beacon, Claim Token |
| 6 | Ring management | Active Monitor Present, SMP |
| 5 | Time-critical control | SCADA, DCS signals |
| 4 | Bridged traffic, important data | Inter-ring communication |
| 3 | Interactive applications | Terminal sessions, databases |
| 2 | Standard applications | Email, file sharing (important) |
| 1 | Bulk transfer | Backups, batch processing |
| 0 | Best effort | Background, optional traffic |
Priority Gotchas:
Priority Inversion: If a low-priority station holds a resource needed by a high-priority station, priority inversion occurs (the high-priority station effectively runs at low priority). Token Ring's priority doesn't solve application-level priority inversion.
Priority Flooding: Misconfigured stations claiming high priority can starve the network. Administrative controls and monitoring are essential.
Priority Mismatch: If communicating applications use different priorities, responses may have different latency than requests, complicating timeout calculations.
Alternative: IBM's Synchronous Traffic:
Beyond the 8-level system, IBM extended Token Ring with Synchronous Bandwidth Allocation for guaranteed bandwidth:
This was proprietary but demonstrated Token Ring's flexibility for demanding applications.
While Token Ring is largely obsolete in office networks, its priority concepts live on. Industrial Ethernet protocols (EtherNet/IP, PROFINET) and Time-Sensitive Networking (TSN) implement similar priority and determinism features, proving the lasting value of Token Ring's innovations.
We've explored Token Ring's sophisticated priority system in depth. Let's consolidate the essential concepts:
What's Next:
With Token Ring's internal mechanisms (token passing, frame format, priority) fully understood, we'll conclude with a comprehensive comparison with Ethernet. You'll see the fundamental trade-offs between these competing technologies and understand why Ethernet ultimately dominated despite Token Ring's technical sophistication.
You now understand the complete Token Ring priority system—from priority levels through reservation, stacking, and fairness analysis. You can calculate worst-case delays and explain why Token Ring was preferred for applications requiring deterministic behavior. Next, we'll compare Token Ring with Ethernet.