Master / slave

from Wikipedia, the free encyclopedia

Master / slave (English for master / slave ) is a form of hierarchical management of access to a common resource, mostly in the form of a common data channel in numerous regulation and control problems .

Basic problem

Only one common transmission channel is available for data transmission (e.g. as a radio link or in the form of a data bus ). If several participants send at the same time, no more transmission can take place, since only mutilated data will then arrive on the bus at the receiving participants. A possibility must therefore be created for the participants to share the data channel by mutual agreement. One possibility is to use the master / slave principle.

Working principle

One participant is the master , all others are the slaves . The master is the only one who has the right to access the shared resource without being asked. The slave cannot access the shared resource of its own accord; he must wait until he is asked by the master ( polling ) or indicate to the master via a connection that bypasses the shared resource that he wants to be asked.

Advantages and disadvantages

The main advantage is that the master controls the access conditions: the system is built around him, which makes planning easy.

Master-slave architectures can also be combined with the token bus , in which case only the masters pass on the token.

A major disadvantage is that communication between slaves is not possible. Furthermore, polling the slaves by the master is inefficient.

commitment

The master-slave method is used, for example:

Master-slave for ATA / ATAPI devices

In the context of the ATA / ATAPI interface, the two devices that can be controlled by an ATA / ATAPI interface are traditionally referred to as master drive and slave drive . This is in contrast to the general meaning described above, since both connected devices (e.g. hard drives) are to be understood as slaves in this sense , while the host (usually the PC) acts as the master . The term is still used because the interface has the peculiarity of only correctly addressing a slave device if a device is also declared and available as a master. According to the official language, these two devices are called Device 0 and Device 1 , respectively . Details on this under ATA / ATAPI .

Master-slave with socket strips

Socket strips based on the master-slave principle (so-called master-slave socket strips ) have a master socket and (usually several parallel-connected ) slave sockets. If a certain minimum current flows in the master socket, this is recognized by the built-in electronics, which then also switch on the slave sockets. If the master consumer is switched off, the slaves are also de-energized. As a rule, such a socket strip also has a button for setting the sensitivity and a signal LED . The main advantage is that only one device (master) has to be switched on or off if several electrically operated devices are to be operated at the same time. Especially when used at a computer workstation (PC = master), such a master-slave automatic system is not only convenient, but also prevents peripheral devices such as monitors, printers or active loudspeakers, etc. from being switched off. The disadvantage is the power strip's low, permanent energy consumption, even when the devices are switched off.

Criticism of the terminology

The terminology has recently been avoided or replaced with a different one, as the terms “master” and “slave” are reminiscent of the practice of slavery .

An alternative for databases is "primary" and "replica", which are used in the documentation from IBM , Microsoft , Engine Yard , Amazon Web Services , and ACM , as well as in Python , Django , Drupal , CouchDB , Redis and MediaWiki (which are still "Master" uses) is used.

In December 2017, the Internet Systems Consortium decided to allow the words "primary" and "secondary" to replace the master / slave terminology in their DNS software BIND .

In 2003, urged Los Angeles County in California to manufacturers, suppliers and contractors, "slave" to stop the use of "master" and in their products; the district makes this request "based on the cultural diversity and sensibility of Los Angeles County." Following complaints about the request, the Los Angeles District issued a statement stating that the decision was "nothing more than a motion." Following this controversy, Global Language Monitor , which analyzes the use of the English language , chose the terms “master / slave” as the most politically incorrect word of 2004.

The " Black Lives Matter" movement reignited the discussion in 2020.

Individual evidence

  1. Master-to-Slave replication ( English ) IBM . Retrieved May 10, 2012.
  2. IBM Knowledge Center ( en-US )
  3. Configure Database Replicas for Management Points ( en )
  4. Set Up Database Replication ( en-US )
  5. Working with Read Replicas of MariaDB, MySQL, and PostgreSQL DB Instances - Amazon Relational Database Service .
  6. Sergey Savinov, Khuzaima Daudjee: Dynamic database replica provisioning through virtualization . In: ACM (Ed.): Proceeding . October 30, 2010, pp. 41-46. doi : 10.1145 / 1871929.1871937 .
  7. Python joins movement to dump 'offensive' master, slave terms (en) . 
  8. Github: Python developers want to replace the terms master and slave - Golem.de . September 14, 2018 ( golem.de [accessed October 7, 2018]).
  9. Fixes # 22667. Replaced leader / follower terminology with primary / replica by fcurella Pull Request # 2694 django / django .
  10. Multiple databases ( s )
  11. Replace "master / slave" terminology with "primary / replica" (en) . In: Drupal.org , May 28, 2014. 
  12. ^ CouchDB - Replace "master" and "slave" terminology (en) . 
  13. Redis - Replace "master" and "slave" terms in Redis (en) . 
  14. Rename DB_SLAVE constant to DB_REPLICA · wikimedia / mediawiki @ 950cf60 .
  15. https://lists.wikimedia.org/pipermail/wikitech-l/2016-September/086450.html
  16. ISC explanation via Twitter .
  17. CNN.com - 'Master' and 'slave' computer labels unacceptable, officials say - Nov. 26, 2003. Retrieved October 7, 2018 .
  18. FACT CHECK: Master / Slave . In: Snopes.com . ( snopes.com [accessed October 7, 2018]).
  19. CNN.com - 'Master' and 'slave' computer labels unacceptable, officials say - Nov. 26, 2003. Retrieved October 7, 2018 .
  20. 'Master / slave' named most politically incorrect term . In: Seattle PI (Ed.): Seattlepi.com . December 3, 2004 (English, seattlepi.com [accessed October 7, 2018]): “The computer term" master / slave, "which was banned as racially offensive by a Los Angeles County purchasing department, was named the most politically incorrect term of the year. [...] Among other terms on the top 10 list of politically charged words and phrases, issued by the word usage group Global Language Monitor, were "non-same sex marriage" to describe heterosexual unions, "waitron "for waiter or waitress and" higher being "for God, a term some people found too religious."
  21. Sebastian Grüner: Black Lives Matter: Linux kernel could get "inclusive language". Golem.de, July 6, 2020, accessed on July 6, 2020 (German).
  22. Stephen Shankland: Tech terms face scrutiny amid anti-racism efforts. CNET, June 10, 2020, accessed July 6, 2020 .