Bus Arbitration in Computer Systems

In a system where multiple components (like the CPU, DMA controller, and I/O processors) need to use the shared system bus, a conflict arises if two or more devices try to access it simultaneously. **Bus Arbitration** is the process of deciding which device gets control of the bus (becomes the 'Bus Master') at any given time.

1. Centralized Arbitration

In centralized arbitration, a single hardware device, known as the **Bus Arbiter**, is responsible for allocating bus time. There are three main schemes:

  • **Daisy Chaining:** All devices are connected in a serial string. The grant signal passes from one device to the next. The closest device to the arbiter has the highest priority.
  • **Polling Method:** The arbiter sends a device ID over polling lines. If a device's ID matches and it needs the bus, it takes control. Priority is determined by the sequence of IDs.
  • **Independent Request:** Each device has its own dedicated Request and Grant lines to the arbiter. This is the fastest but requires the most wiring.

2. Distributed Arbitration

In distributed arbitration, there is no central controller. Instead, each device contains its own arbitration logic, and they all interact to decide who gets the bus next.

  • Devices use a shared set of priority lines.
  • If multiple devices request the bus, the one with the highest unique ID wins based on the logic state of the priority bus.
  • More reliable because there is no single point of failure (the central arbiter).

Comparison Table

FeatureDaisy ChainingPollingIndependent Request
Wiring ComplexityLowestMediumHighest
PriorityFixed (by physical location)Programmable/FlexibleFastest/Fixed
Fault ToleranceLow (one failure breaks chain)ModerateHigh
SpeedSlowestModerateFastest

Key Terms

  • **Bus Master:** The device currently allowed to initiate data transfers on the bus.
  • **Bus Request (BR):** The signal sent by a device to ask for bus access.
  • **Bus Grant (BG):** The signal sent by the arbiter to allow a device to take control.
  • **Bus Busy (BB):** A signal indicating the bus is currently in use.

Common Mistakes to Avoid

  • Assuming the CPU is always the Bus Master (DMA controllers often take control).
  • Confusing Bus Arbitration with Network Collision Detection.
  • Thinking Daisy Chaining is the 'best' because it's simple (it's actually the most vulnerable to hardware failure).
  • Ignoring the propagation delay in long Daisy Chains.

Advanced Concepts

  • Time-slice (Fairness) Algorithms
  • LRU (Least Recently Used) Arbitration
  • PCI Express (PCIe) Point-to-Point Architecture
  • Split-transaction Buses
  • Synchronous vs. Asynchronous Arbitration

Practice Exercises

  • Why is the Independent Request method preferred for high-performance servers?
  • If Device 2 fails in a Daisy Chain, what happens to Device 3?
  • Explain how the Polling method can be used to implement a Round-Robin priority scheme.
  • Contrast centralized vs. distributed arbitration in terms of scalability.

Conclusion

Bus arbitration is essential for preventing data collisions in multi-master systems. While Daisy Chaining offers simplicity for low-cost systems, modern high-speed architectures rely on Independent Request or Distributed methods to ensure speed and reliability.

Note: Note: Modern systems have largely moved away from shared 'parallel buses' to 'switched point-to-point interconnects' (like PCIe) to avoid arbitration bottlenecks entirely.