Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Course
  • Reading Paths
  • Concept Map
  • How to Read the Diagrams
  • Part 0: What Is a Protocol?10
  • Part 1: Timing and Clocking11
  • Part 2: Encoding and Framing12
  • Part 3: Handshakes13
  • Part 4: Flow Control17
  • Part 5: Transactions19
  • Part 6: Concurrency and Performance17
  • Part 7: Ordering13
  • Part 8: Sharing and Arbitration12
    • Shared Media and Topologies
    • Arbitration Policies
    • Fairness and Starvation
    • Priority Inversion
    • Arbitration Granularity
    • Distributed Arbitration
    • Quality of Service
    • Virtual Channels
    • Routing
    • Multicast and Broadcast
    • Protocols Compared: Sharing and Arbitration
    • Drills: Sharing and Arbitration
  • Part 9: Deadlock and Liveness13
  • Part 10: Reliability and Recovery20
  • Part 11: Bring-Up and Link Management10
  • Part 12: Power8
  • Part 13: Shared State and Coherence9
  • Part 14: Security and Isolation7
  • Part 15: Specifying and Verifying11
  • Part 16: Protocols Dissected17
  • Part 17: Capstones5
  • Part 18: Interview Preparation6
Loading lesson

‹Part 8: Sharing and Arbitration
  1. Topics
  2. First Principles of Hardware Protocols
  3. Part 8: Sharing and Arbitration
  4. Quality of Service

Part 8 · Sharing and Arbitration · Senior (S)

Quality of Service

Quality of service: making shared resources keep promises to different kinds of traffic. Traffic classes, priority, bandwidth regulation and reserved resources, combined to guarantee latency-critical traffic next to bulk traffic.

On this page

    Note

    Level: Senior (S) · Answers: Who gets the wire?

    Before this: Fairness and Starvation, Rate-Based Shaping

    A display controller must fetch a line of pixels every few microseconds, or the screen tears. A GPU sharing the same memory will happily use all the bandwidth it can get. Round-robin gives them equal turns, which is fair and wrong: the GPU's long bursts and deep queues still push the display's reads past their deadline. The display does not need more bandwidth than the GPU. It needs a promise.

    How does a shared fabric keep different promises to different kinds of traffic?

    The obvious answer, and why it breaks

    The obvious answer is priority: give the display the highest priority everywhere. It helps at arbiters, but the display's reads still wait in queues full of GPU requests that were accepted earlier (lesson 8.4), behind GPU bursts already in progress (lesson 8.5), and in memory controllers optimising for GPU efficiency (lesson 6.10). And if the display were ever given unlimited priority and misbehaved, it would starve everything else. Quality of service is a combination of mechanisms, each closing one of these gaps.

    The idea: four mechanisms together

    Mechanism

    What it does

    Closes the gap of

    Traffic classes

    Label each transaction with what kind of traffic it is (real-time, latency-sensitive, bulk)

    Agents along the path not knowing what matters

    Priority

    Arbiters and schedulers prefer higher classes

    Losing arbitration to bulk traffic

    Bandwidth regulation

    Limit each source's rate and burst (token buckets, lesson 4.10)

    A high-priority source starving others, and bulk sources flooding queues

    Reserved resources

    Queue slots, buffers or virtual channels that only a class may use

    Waiting behind other traffic already queued

    The display's requests are classed high and use a reserved queue; the GPU is rate-limited and classed low; the arbiter prefers high but ages low so it cannot starve.

    Worked numbers: the display's budget

    Illustrative numbers:

    Diagram
    Display needs:      2 GB/s, and each read back within 2 us (its line buffer covers 2 us)
    GPU regulated to:   20 GB/s average, bursts of at most 32 requests
    Worst wait for a display read at the memory port:
      in-progress GPU burst (capped at 16 beats)         ~16 cycles
      GPU requests ahead in the shared queue            0 (display uses its reserved queue)
      memory controller latency at expected load        ~600 ns
    Result: well under 2 us; without the reserved queue, up to 32 queued GPU requests could add several microseconds

    How real protocols carry QoS

    Protocol

    QoS fields and mechanisms

    AXI4

    AxQOS: a 4-bit priority value on each transaction, used by interconnects and memory controllers; regulators at ports enforce rates.

    PCI Express

    Traffic classes (3 bits) mapped onto virtual channels with separate buffers and credits, so classes do not share queues.

    Network-on-chip

    Separate virtual channels per class, priority arbitration with ageing, and rate regulation at injection points.

    What breaks

    • Priority without regulation: a real-time source with a bug (illustrative) issued requests continuously at top priority and starved the whole system. High priority must come with a rate limit.

    • Priority without reserved resources: the display had top priority but its reads still waited behind 64 GPU requests already in the memory controller's queue. A few reserved slots fixed it.

    • Classes lost at a bridge: a bridge that dropped AxQOS turned every display read into ordinary traffic beyond it (lesson 5.17).

    Why this matters

    Principal lens. Write QoS requirements as promises (bandwidth and worst-case latency per class, at stated load), then trace each promise through every shared resource on its path and name the mechanism that keeps it there: class, priority, regulation, reservation. Any resource without a mechanism is where the promise breaks. Every priority must come with a rate limit, so the most important traffic cannot become the most dangerous.

    Interview

    Asked: "How would you guarantee display latency next to a GPU?"

    Weak answer: Give the display the highest priority.

    Strong answer: Priority alone isn't enough. I'd mark display traffic with a high class, give it priority at every arbiter with ageing for the rest, regulate the GPU with a token bucket so its bursts and queue occupancy are bounded, reserve queue slots or a virtual channel for display requests so they never wait behind queued GPU traffic, and cap burst lengths on shared links. Then I'd budget the display's worst-case latency hop by hop and verify it under a saturating GPU load. And the display itself gets a rate limit, so a bug there can't starve everyone.

    Follow-ups: (1) Why does high priority need a rate limit? (2) Where does priority fail to help?

    Check yourself Why can a top-priority request still miss its deadline?

    It can wait behind requests already queued ahead of it, behind a burst in progress, or behind a held resource; priority only helps at arbitration.

    Check yourself What does a token bucket on the GPU give the display?

    A bound on how many GPU requests can arrive in a burst and how fast they come on average, which bounds queue occupancy and the display's wait.

    Key takeaways

    • QoS combines traffic classes, priority, bandwidth regulation and reserved resources.

    • Priority helps at arbiters; reservations help in queues; regulation bounds everyone, including the high-priority source.

    • Write QoS as per-class promises and name the mechanism that keeps each one at every shared resource.

    Keep going

    Next: Lesson 8.8, Virtual Channels. Several logical channels on one physical link: what they isolate, and what they cost.

    Related topics

    • Part 8 overview: Sharing and Arbitration

    • Architecture course: Arbitration Policies and QoS

    Previous

    123 / 234

    Next: Virtual Channels

    Up next

    Up nextVirtual Channels

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Shared Media and Topologies
    • Arbitration Policies
    • Fairness and Starvation