Lably
Skip to content

Master–slave (technology)

Relationship between devices in which one controls the other

  • 5 min read
  • 4 chapters

Related on Lably

Through Engineering, Slavery and Hydraulics

Due to its association with slavery, the terminology is a subject of controversy and has been replaced with alternative terms in some cases.

Examples

In photography, secondary, or slave, flash units are connected to a master unit to provide synchronized lighting.

Parallel audio duplication often entails multiple recording with devices (i.e., for cassette tape or compact disc) linked together so that operating the controls of a master device triggers the same commands on slave devices.

Railway locomotives operating in the same train (for example, to pull a load too heavy for a single locomotive) may be configured for master–slave operation with all but one of the locomotives controlled from the first. See Multiple-unit train control.

In a hydraulic system, a master cylinder is a control device that converts force into hydraulic pressure that drives movement in a slave cylinder at the other end of the hydraulic line. A common application is a vehicle brake system.

A master clock provides time signals used to synchronize one or more slave clocks as part of a clock network. A slave clock receives and displays the time from a master, though it may be able to keep time itself if the master is not working.

Computing

Computer bus protocols often use a master-slave relationship. For instance, a USB host manages access to the USB bus shared by any number of USB devices. A serial peripheral interface (SPI) bus typically has a single master controlling multiple slaves. I2C and I3C may even have multiple masters on a bus. Modbus also uses a master device to initiate connection requests to slave devices.

An edge-triggered flip-flop can be created by arranging two gated latches in a master–slave configuration. It is so named because the master latch controls the slave latch's value and forces the slave latch to hold its value, as the slave latch always copies its new value from the master latch.

In database replication, the master database is the authoritative source. The slave or replica database is controlled by the master database, which repeats its update commands (for example by way of event log) to the slave. The slave therefore retains an exact copy of transaction processed by the source database (up to the most recently transmitted log) This scheme is not as strict as electronic devices sharing a clock, however the slave database only does what the master tells it, unless the slave is promoted due to failure of the master. Some databases implement so-called multi-master replication, where a mix of writeable master nodes and readable nodes is used. These databases are used in scenarios where performance is an acceptable tradeoff for ACID properties, for example, non-mission-critical data, like suggesting similar purchases.

Sign in to keep reading

3 more chapters are free with a Lably account.

More in Engineering