Bus mastering (original) (raw)

Bus mastering is a feature supported by some bus architecturess that enables a controller connected to the bus to communicate directly with other devices on the bus without going through the CPU. Most modern bus architectures, including PCI, support bus mastering because it significantly improves performance.

The bus master is the device which drives the address bus and bus control signals. In a simple architecture only the CPU can be bus master: this means that all communications between input and output (I/O) devices must involve the CPU. More sophisticated motherboard architectures allow other capable devices (or multiple CPUs) to take turns at controlling the bus. This allows a network controller card, for example, to access a disk controller directly while the CPU performs other tasks which do not require the bus, such as fetching code from its cache.

Direct memory access is a simple form of bus mastering where the I/O device is set up by the CPU to read from or write to one or more immediate blocks of memory and then signal to the CPU when it has done so. Full bus mastering (or "first-party DMA", "bus mastering DMA") implies that the I/O device is capable of performing more complex sequences of operations without CPU intervention. This will normally mean that the I/O device contains its own processor or microcontroller. Any device can drive data onto the data bus when the CPU reads from that device, but only the bus master drives the address bus and control signals.