Token Ring Networks and IEEE 802.5
Priority Mechanism: Differentiated Service in Token Ring
Read aloud is unavailable in this browser.
Beyond First-Come, First-Served
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:
- Time-critical traffic gets precedence — Priority 6 traffic always beats priority 3
- Fairness is preserved — Lower-priority stations aren't completely starved
- Deterministic behavior — Maximum wait times are calculable even with priority
- Protocol integrity — Priority increases are temporary and properly restored
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.
Priority Levels
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
- P bits (7-5): Current priority level of the token
- R bits (2-0): Reservation for next token's priority
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:
- Token arrives with P=4 (priority 4)
- Station A has priority 3 traffic: Cannot capture (3 < 4)
- Station B has priority 5 traffic: Can capture (5 ≥ 4)
- Station C has priority 4 traffic: Can capture (4 ≥ 4)
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:
- Station observes a token with P < its traffic priority
- Station cannot immediately capture (station may already be forwarding)
- Station makes a reservation (using R bits) for higher priority
- Eventually, token priority is raised to match the reservation
- Now only stations at or above the new priority can capture
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 Mechanism
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:
- Multiple stations can make reservations simultaneously
- Only the highest reservation survives
- Lower reservations don't overwrite higher ones
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:
- Frame Pass-Through: As a frame passes (any station can modify R in the AC byte)
- Token Pass-Through: When a station forwards a token it cannot capture (P > its priority)
- Token Release: Transmitting station sets P = max(old_R, its own priority)
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:
- All their reservations "win" (since R=5 and R=5 are equal)
- New token has P=5
- All priority-5 stations compete for this token
- The first one to receive it captures it (round-robin among equals)
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.
Priority Operation Walkthrough
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:
- Ring has 4 stations: A, B, C, D (in ring order)
- Currently: Token circulating at P=0, R=0
- Station B has priority-4 traffic
- Station C has priority-2 traffic
- Station D has priority-0 traffic
- Stations A and B are idle (no traffic)
Detailed Step-by-Step:
Step 1: Initial Token Circulation
- Token at P=0, R=0 passes Station A (no traffic, forwards)
- Token reaches Station B (has P4 traffic)
- B cannot capture yet (will let current operation complete)
- B sets R=4 (reservation accepted: 4 > 0)
- Token now: P=0, R=4
Step 2: Reservation Propagation
- Token passes Station C (has P2 traffic)
- C cannot override R (2 < 4), forwards unchanged
- Token reaches Station D (has P0 traffic)
Step 3: Token Capture at Priority 0
- Station D: My priority (0) ≥ token priority (0)? Yes!
- D captures token (changes T from 0 to 1)
- D transmits its P0 frame
- Frame circulates with R=4 in AC field
Step 4: Frame Return and Token Release
- Frame returns to Station D
- D strips the frame
- D examines R field: R=4
- D releases new token with P=4, R=0
- (Priority elevated to honor reservation)
Step 5: Priority-4 Token Circulation
- Token at P=4 passes Station A (no traffic): Forwards
- Token reaches Station B (has P4 traffic)
- B: My priority (4) ≥ token priority (4)? Yes!
- B captures and transmits
Step 6: Station C Waits
- While P=4 token circulates, Station C (P2) cannot capture
- C must wait until priority drops back to ≤2
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
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:
- Records the original priority (Sr) and reservation (Sx) values
- Pushes this information onto a local stack (LIFO)
- Is now responsible for eventually restoring priority
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
- Station B had reservations (R=4) while A transmitted
- A finishes, sees R=4 > Sr(0)
- A pushes (Sr=0, Sx=0) onto stack
- A releases token at P=4, R=0
- A is now the stacker responsible for restoring to P=0
Step 2: Station B Transmits at P=4
- B captures P=4 token
- B completes transmission
- B checks: Any reservation higher than 4? No
- B checks: Am I the stacker for P=4? No (A is)
- B releases token at P=4, R=0 (maintains priority)
Step 3: No More P=4 Traffic
- Token at P=4 circulates
- No station with P≥4 traffic captures it
- Token returns to Station A (the stacker)
Step 4: Priority Restoration
- A receives uncaptured P=4 token
- A is the stacker, pops stack: (Sr=0, Sx=0)
- A releases token at P=0, R=0
- Priority restored! Lower priority stations can now compete
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.
Priority and Fairness Analysis
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:
- While high-priority traffic exists: Lower-priority stations cannot transmit
- When high-priority traffic exhausts: Stacker restores lower priority
- Starvation is possible if high-priority traffic is continuous
Calculating Maximum Wait Time:
For a station at priority level k, the worst-case wait time occurs when:
- All higher-priority stations are continuously transmitting
- Each completes one THT before the token circulates
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:
- Switches queue frames by priority
- No guarantee frames reach switch quickly (CSMA/CD contention)
- Priority only affects queuing, not channel access
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.
Priority in Practice
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:
- Priority 7: Emergency stop signals, safety interlocks
- Priority 6: PLC (Programmable Logic Controller) coordination
- Priority 5: Real-time sensor data
- Priority 4: Operator console updates
- Priority 0-3: Non-critical logging, bulk data transfer
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:
- High-priority: Trade execution messages
- Medium-priority: Quote updates
- Low-priority: Administrative traffic, logging
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:
- Stations reserve bandwidth for synchronous traffic
- Synchronous traffic bypasses normal token passing
- Provides isochronous (constant-rate) delivery
- Used for voice/video before VoIP matured
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.
Summary: Priority Mechanism Mastery
We've explored Token Ring's sophisticated priority system in depth. Let's consolidate the essential concepts:
- •Eight Priority Levels: 0-7 encoded in 3 P bits; higher values mean higher priority. Levels 6-7 reserved for ring management.
- •Reservation Mechanism: R bits allow stations to request elevated priority for the next token, with highest reservation winning.
- •Priority Capture Rule: Stations may only capture tokens when their priority ≥ token's P value.
- •Stacking for Restoration: The station that raises priority records original values and is responsible for restoring them when high-priority traffic ends.
- •Bounded Delay: Maximum wait time is calculable based on higher-priority station count and THT, enabling real-time system design.
- •Practical Applications: Manufacturing, trading, and medical systems leveraged priority for time-critical traffic.
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.
KEEP LEARNING
Keep learning for free.
Read the complete lesson, save your notes and pick up where you left off with a free account. No card needed.