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 Scheduling — Architecture & Algorithms

Overview

Packet scheduling defines how a communication system decides which packet to transmit next when multiple flows, queues, or traffic classes compete for the same output link. Scheduling is fundamental to performance, fairness, latency guarantees, and Quality of Service (QoS). It shapes how bandwidth is shared, how congestion is handled, and how different applications perceive the network.

Modern systems use a combination of priority rules, weighted allocation, fairness algorithms, and deadline‑based scheduling to meet diverse requirements ranging from best‑effort traffic to real‑time flows.

Scheduling Objectives

Packet scheduling mechanisms are designed to achieve several key goals:

  • Fairness — ensure that flows receive a reasonable share of bandwidth
  • Latency control — bound delay for real‑time or interactive traffic
  • Throughput maximization — keep the link fully utilized
  • Isolation — prevent one flow from starving others
  • QoS enforcement — guarantee bandwidth or delay for specific classes
  • Congestion management — avoid queue buildup and buffer overflow

Different algorithms prioritize different objectives depending on system requirements.

Architectural Components

Queues

Packets are stored in one or more queues, typically organized by:

  • traffic class
  • priority level
  • flow identifier
  • service type

Queue structure determines how scheduling decisions are applied.

Classifiers

Incoming packets are classified into queues based on:

  • header fields
  • flow identifiers
  • QoS markings
  • protocol type

Classification ensures that scheduling policies apply to the correct traffic.

Scheduler

The scheduler selects the next packet to transmit based on:

  • queue state
  • algorithm rules
  • deadlines or weights
  • fairness constraints

The scheduler is the core of the system.

Fundamental Scheduling Algorithms

First‑In, First‑Out (FIFO)

Packets are served in arrival order.

Pros: simple, minimal overhead
Cons: no fairness, no QoS, susceptible to head‑of‑line blocking

Used in simple switches and embedded systems.

Priority Scheduling

Queues are assigned priorities; higher‑priority queues are served first.

Pros: strong latency guarantees for high‑priority traffic
Cons: lower‑priority traffic may starve

Used in real‑time systems and control networks.

Round‑Robin (RR)

Each queue is served in cyclic order.

Pros: simple fairness
Cons: ignores packet size; large packets dominate link time

Suitable for systems with uniform packet sizes.

Weighted Round‑Robin (WRR)

Each queue receives a number of service opportunities proportional to its weight.

Pros: bandwidth allocation control
Cons: still sensitive to packet size

Used in QoS‑enabled switches.

Deficit Round‑Robin (DRR)

Each queue receives a “deficit counter” that accumulates credits. Packets are transmitted while the counter covers their size.

Pros: fair with variable packet sizes; efficient
Cons: slightly more complex than WRR

Widely used in routers and NICs.

Fairness‑Oriented Algorithms

Fair Queuing (FQ)

Simulates bit‑by‑bit round‑robin service across flows.

Pros: strong fairness
Cons: computationally expensive

Weighted Fair Queuing (WFQ)

Extends FQ by assigning weights to flows.

Pros: precise bandwidth guarantees; strong fairness
Cons: requires virtual finish‑time computation

Used in high‑end routers and QoS systems.

Stochastic Fairness Queuing (SFQ)

Uses hashing to approximate fair queuing with low overhead.

Pros: scalable fairness
Cons: hash collisions may cause imbalance

Used in large‑scale systems where per‑flow state is expensive.

Deadline‑Based Scheduling

Earliest Deadline First (EDF)

Packets with the earliest deadlines are served first.

Pros: optimal for meeting deadlines
Cons: requires deadline metadata; sensitive to overload

Used in real‑time communication systems.

Rate‑Monotonic Scheduling (RMS)

Periodic flows with shorter periods receive higher priority.

Pros: predictable; widely used in real‑time systems
Cons: less flexible than EDF

Scheduling in Modern Systems

Data Center Networks

Schedulers enforce:

  • flow isolation
  • latency guarantees
  • congestion control integration (e.g., DCTCP, ECN)

Techniques include DRR, WFQ, and deadline‑aware scheduling.

Wireless Networks

Schedulers must adapt to:

  • channel quality
  • mobility
  • interference
  • variable link rates

LTE and 5G use:

  • proportional fair scheduling
  • channel‑aware scheduling
  • QoS class identifiers (QCIs)

High‑Speed Interconnects

PCIe, CXL, and NoCs use:

  • strict priority for control traffic
  • weighted scheduling for data flows
  • credit‑based flow control integration

Scheduling must align with flit‑level arbitration.

Operating Systems

OS network stacks use:

  • fair queuing
  • traffic shaping
  • priority queues

Schedulers interact with socket buffers and congestion control.

Performance Considerations

Latency

Priority and deadline‑based scheduling minimize latency for critical flows.

Throughput

Round‑robin and deficit‑based algorithms maximize link utilization.

Fairness

WFQ and DRR provide strong fairness across flows.

Complexity

More advanced algorithms require:

  • per‑flow state
  • timestamp computation
  • virtual time tracking

Hardware schedulers must balance precision and cost.

Comparison of Scheduling Algorithms

AlgorithmFairnessLatency GuaranteesComplexityTypical Use
FIFOLowNoneVery LowSimple switches
PriorityLowStrong for high‑priorityLowReal‑time systems
RRMediumMediumLowUniform packet sizes
DRRHighMediumMediumRouters, NICs
WFQVery HighStrongHighQoS routers
EDFMediumVery StrongMediumReal‑time networks

Design Tradeoffs

  • Fairness vs latency — strict priority improves latency but harms fairness.
  • Complexity vs precision — WFQ offers precise guarantees but is expensive.
  • Scalability vs per‑flow state — SFQ trades precision for scalability.
  • QoS vs resource usage — more classes require more queues and memory.
  • Hardware vs software scheduling — hardware is faster but less flexible.

Related Pages

Summary

Packet scheduling determines how packets compete for transmission opportunities, shaping fairness, latency, throughput, and QoS. Through priority rules, weighted allocation, fairness algorithms, and deadline‑based scheduling, modern systems achieve predictable and efficient communication across wired, wireless, and high‑speed interconnects.