A computer bus connects components through agreed communication paths and transfer rules. On a shared computer bus, a CPU and a DMA engine can both want the same path to computer memory: attaching another initiator does not create another independent path. Bus arbitration chooses who may start; bus ownership states who may use each resource; bus throughput measures the useful data delivered. This makes sharing a performance question as well as a correctness question.
The computer bus path identifying the destination or location of a bus transaction. An initiator supplies an address; decoding selects the intended target. Address width describes the available address encodings, whereas data bus width describes how many bits can be carried at once.[ref]
The computer bus path carrying payload. A write sends data from the initiator to the target; a read returns data from the target. Owning the request path does not mean driving the data bus in both directions.[ref]
Lecture 21: Buses and I and O. CS152 lecture 21, slide 24: initiator commands, data in either direction
The computer bus paths specifying operations and coordinating progress, including requests and acknowledgments. Some control travels from initiator to target and some returns. In the diagram, bus arbitration requests and grants are shown separately from transfer control to distinguish choosing an initiator from executing its bus transaction.[ref]
Lecture 21: Buses and I and O. CS152 lecture 21, slides 22 and 33–36: control signals, sequencing, request and grant
One requested operation and its completion, potentially including several payload transfers. A bus transaction identifies a target, specifies an operation and exchanges data or status. A CPU or DMA engine can initiate one; a target responds. The terms “master” and “slave” in older hardware documents refer to these initiator and target roles.[ref]
One clock period in a synchronous computer bus. A bus transaction can occupy several bus cycles. An asynchronous computer bus instead coordinates progress through acknowledgments, so a clock-based count requires an additional timing model.[ref]
Lecture 21: Buses and I and O. CS152 lecture 21, slides 32–33: synchronous and asynchronous sequencing
An extension while a bus transaction awaits readiness. A bus wait state spends time without completing the next payload transfer. In a blocking design it also postpones another initiator's access; completion and bus ownership changes must follow the protocol.[ref]
A group of related payload transfers, often to consecutive addresses, arranged under one transfer sequence. A bus burst can amortize setup and bus arbitration overhead; a longer period of exclusive bus ownership can also make another initiator wait longer. The exact overhead and permitted handover boundaries depend on the protocol.[ref]
Selecting among initiators requesting a shared resource. An arbiter grants permission before an initiator starts its bus transaction. Fixed priority can indefinitely postpone a lower-priority requester under continuing higher-priority demand. Rotating priority can provide starvation freedom when every owner releases the resource after bounded work. Neither policy alone determines bus throughput: waiting, setup and target readiness also matter.[ref]
Lecture 21: Buses and I and O. CS152 lecture 21, slides 35–36: reservation, priority and fairness
The permission to use a particular computer bus resource during a specified phase. A pending grant need not authorize immediate use. Arm's AMBA Specification, revision 2.0 (section 3.11.3, figures 3-15–3-17) makes address-path handover depend on completion, and delays data bus ownership relative to address bus ownership. Consequently, a single whole-bus transaction owner is a useful simple model, but does not describe every overlapping implementation.
Here, competition between pending initiators for the same shared computer bus resource. Correct bus arbitration converts this competition into waiting. Simultaneously driving incompatible values on the same electrical lines is a different, erroneous kind of bus contention; multiple pending requests need not cause it.
Useful payload completed per unit elapsed time, with the observation interval stated. A raw data bus rate counts available transfer capacity; achieved bus throughput also depends on setup, bus wait states, idle intervals and sharing. Bus contention can increase a requester's delay even when the aggregate bus throughput remains unchanged, as the shared-bus timing example shows.
Stipulated bus arbitration and payload timing for two competing bus bursts
. Details. An interconnect family using point-to-point links; the topology distinction is explained under shared buses and point-to-point links.
A processor interconnect using point-to-point links; shared buses and point-to-point links explains why the word “bus” alone does not determine its topology.
// Destination: computer-science.bigb
Direct memory access transfers data between a device and computer memory without the CPU executing a copy instruction for each item. The CPU still sets up the operation and observes completion. DMA answers who moves the data; an interrupt answers how a need for attention is announced. A DMA transfer can therefore finish with interrupt-driven input-output or with polled input-output. [ref]
https://pages.cs.wisc.edu/~remzi/OSTEP/file-devices.pdf. Arpaci-Dusseau and Arpaci-Dusseau, OSTEP chapter 36, section 36.5: DMA
For a toy receive operation, the CPU arranges a four-byte DMA buffer and tells the device its DMA address, length and direction. The device writes the bytes
A, B, C, D into that DMA buffer. After completion and any required DMA buffer synchronization, the CPU can read those four bytes. There are four payload bytes, but no four-item CPU copy loop on the device-to-computer memory path. This is a schematic example, not an instruction to operate real hardware.The useful separation is that the CPU can perform other work while a larger transfer proceeds. The reasoning is a division of responsibilities: setup specifies the destination and extent once; the transfer engine advances through the payload; completion reports the result. The data still crosses an interconnect such as a computer bus, which must share access among competing initiators. Setup, mapping, synchronization and completion cost work, so DMA does not promise a speedup for every transfer size. [ref]
https://docs.kernel.org/core-api/dma-api.html. James E. J. Bottomley, Linux DMA API, parts Ic–Id: mapping costs, addressing constraints and transfer directions
Correctness also requires keeping the DMA buffer alive and coordinating its ownership until the device is finished. A DMA address need not equal a CPU virtual address or physical address. An IOMMU, when present and configured, translates device addresses and can restrict access to authorized computer memory; it is not the CPU's memory management unit. Operating-system process isolation through virtual memory alone does not establish those device-access restrictions. [ref]
https://docs.kernel.org/core-api/dma-api-howto.html. Linux kernel documentation, Dynamic DMA mapping Guide: CPU and DMA addresses
[ref]https://docs.kernel.org/driver-api/vfio.html. Linux kernel documentation, VFIO: IOMMU protection and device isolation
A region of computer memory prepared for DMA. In the four-byte receive example it is the payload destination, and must remain available until the transfer and required DMA buffer synchronization are complete.
An address supplied to a device for DMA, in the device's address system. The Linux kernel's mapping interface returns this separately from the CPU's virtual address; an IOMMU can translate it to a physical address. [ref]
https://docs.kernel.org/core-api/dma-api-howto.html. Linux kernel documentation, Dynamic DMA mapping Guide: CPU and DMA addresses
Coordinating CPU and device access to a DMA buffer, including any required memory cache maintenance and ordering. A completed device write must be made visible before the CPU consumes it. The Linux kernel distinguishes coherent mappings from streaming mappings needing synchronization at ownership changes; even coherent mappings can require ordering of writes. [ref]
https://docs.kernel.org/core-api/dma-api-howto.html. Linux kernel documentation, Dynamic DMA mapping Guide: types of DMA mappings and using streaming DMA mappings
[ref]https://docs.kernel.org/core-api/dma-api.html. James E. J. Bottomley, Linux DMA API, part Ia: coherent buffers and write ordering
Hardware translating device DMA addresses to physical addresses, with access restrictions used for device isolation. Availability, configuration and isolation boundaries depend on the platform; merely having an IOMMU does not establish complete isolation. [ref]
https://docs.kernel.org/driver-api/vfio.html. Linux kernel documentation, VFIO: IOMMUs, device topology and isolation groups
Articles by others on the same topic
There are currently no matching articles.


