DexterLab

🚨 New downloadable modules coming soon📘 Electrical Signaling & PHY Interfaces — new overview📘 Electrical I/O Standards — new overview📘 Integration between Theory and Design Library in progress

Packet Scheduler — Architecture & Arbitration Policies

Introduction

The packet scheduler determines when each packet is transmitted and which packet is selected when multiple packets compete for the same output resource. It is a central component of the packet‑processing pipeline, responsible for enforcing fairness, prioritization, bandwidth allocation, latency guarantees, and congestion management.
A well‑designed scheduler ensures that packets flow smoothly through the system, respecting protocol rules, QoS requirements, and system‑level constraints.

This page describes the architecture of packet schedulers, the most common arbitration policies, the tradeoffs between fairness and performance, and the practical considerations for high‑speed implementations.

Role of the Packet Scheduler

The scheduler makes time‑critical decisions based on:

  • queue occupancy
  • packet priority
  • flow control state
  • QoS requirements
  • congestion conditions
  • protocol‑specific rules

Its responsibilities include:

  • selecting the next packet to transmit
  • enforcing fairness across flows
  • honoring priority and QoS constraints
  • preventing starvation
  • managing congestion and backpressure
  • coordinating with flow control mechanisms

The scheduler is the “traffic controller” of the packet‑processing pipeline.

Scheduling Inputs

Queue State

The scheduler monitors:

  • queue occupancy
  • queue depth thresholds
  • packet age
  • per‑queue priority

Metadata

From the classifier and parser:

  • priority level
  • flow ID
  • QoS class
  • packet length
  • protocol type

Flow Control State

Scheduling decisions must respect:

  • credit availability
  • sliding window limits
  • congestion notifications
  • buffer availability downstream

System Policies

These include:

  • fairness rules
  • bandwidth allocation
  • latency constraints
  • protocol‑specific arbitration rules

Scheduling Outputs

The scheduler produces:

  • selected queue ID
  • selected packet
  • timestamp or scheduling metadata
  • flow control updates
  • signals to dequeue and transmit

This output drives the transmit pipeline and ensures packets are sent in the correct order.

Scheduling Architecture

1. Queue Organization

Packets are typically stored in:

  • per‑priority queues
  • per‑flow queues
  • per‑port queues
  • virtual channel queues

The queue structure determines the granularity of scheduling.

2. Eligibility Check

A queue is eligible if:

  • it is non‑empty
  • it has sufficient credits
  • it is not flow‑controlled
  • it meets protocol‑specific constraints

3. Arbitration

Among eligible queues, the scheduler selects one based on the arbitration policy.

4. Dequeue and Dispatch

The selected packet is dequeued and forwarded to:

  • MAC
  • PCS
  • transport layer
  • DMA or memory subsystem

This marks the start of the transmit path.

Arbitration Policies

Strict Priority

Highest‑priority queue always wins.
Advantages:

  • minimal latency for high‑priority traffic
    Disadvantages:
  • lower‑priority queues may starve

Used in real‑time systems and control traffic.

Round‑Robin

Queues are served in cyclic order.
Advantages:

  • fairness
  • simple implementation
    Disadvantages:
  • no prioritization

Useful for equal‑priority flows.

Weighted Round‑Robin (WRR)

Each queue receives service proportional to its weight.
Advantages:

  • bandwidth allocation
  • fairness with prioritization
    Disadvantages:
  • more complex than simple round‑robin

Common in QoS‑aware systems.

Deficit Round‑Robin (DRR)

Improves WRR by accounting for variable packet sizes.
Advantages:

  • fair for variable‑length packets
  • efficient bandwidth distribution
    Disadvantages:
  • requires deficit counters

Used in routers and NICs.

Credit‑Based Scheduling

Transmission depends on available credits.
Advantages:

  • prevents buffer overflow
  • integrates with flow control
    Disadvantages:
  • requires tight coordination with credit logic

Used in PCIe and other credit‑based protocols.

Age‑Based Scheduling

Older packets are prioritized.
Advantages:

  • prevents starvation
  • reduces tail latency
    Disadvantages:
  • may violate strict priority rules

Useful in congestion‑sensitive systems.

Performance Considerations

Throughput

Schedulers must sustain:

  • line‑rate throughput
  • multi‑lane parallelism
  • minimal backpressure

Parallel arbitration engines are common in high‑speed designs.

Latency

Low latency is essential for:

  • real‑time traffic
  • credit‑based flow control
  • congestion management

Strict priority and fixed‑format arbitration offer the lowest latency.

Fairness

Schedulers must prevent:

  • starvation
  • unfair bandwidth allocation
  • protocol violations

Weighted and deficit‑based algorithms improve fairness.

Resource Usage

Schedulers consume:

  • counters and timers
  • priority encoders
  • lookup tables
  • queue state logic

Efficient queue organization reduces resource usage significantly.

Congestion Management

Schedulers interact closely with congestion mechanisms:

  • backpressure signals
  • credit depletion
  • ECN or congestion notifications
  • buffer occupancy thresholds

Scheduling decisions must adapt dynamically to congestion conditions.

Real‑World Examples

Ethernet

  • strict priority for control traffic
  • WRR or DRR for data traffic
  • QoS mapping from VLAN or DSCP fields

PCIe

  • credit‑based scheduling
  • traffic class arbitration
  • virtual channel prioritization

USB4

  • virtual channel scheduling
  • flow control token coordination
  • priority‑based arbitration

JESD204

  • deterministic latency scheduling
  • frame‑aligned transmission
  • lane‑balanced scheduling

Each protocol defines its own arbitration rules and performance goals.

Related Pages

Summary

The packet scheduler is responsible for selecting which packet is transmitted next, enforcing fairness, prioritization, and protocol‑specific rules.
It must balance throughput, latency, fairness, and resource usage while coordinating with flow control and congestion mechanisms.
A robust scheduler is essential for high‑performance, scalable, and predictable packet‑processing systems.