Master/slave is an ar­chi­tec­tur­al concept in in­for­ma­tion tech­nol­o­gy that describes how resources are con­trolled and dis­trib­uted. Within this model, a master device or process has control over how and when sub­or­di­nate devices and processes use resources. This model is used, for example, to generate piconets in Bluetooth.

When is the master/slave model used?

The master/slave model can be im­ple­ment­ed when several devices, processes or ap­pli­ca­tions depend on the same resources. This is, for instance, the case when trans­mit­ting data via a data bus. The master/slave model regulates requests and ensures that com­mu­ni­ca­tion between the signals takes place without any in­ter­fer­ence or mod­i­fi­ca­tion from other par­tic­i­pants. This guar­an­tees that all processes are executed correctly.

Note

The term “master/slave” is extremely prob­lem­at­ic given its reference to slavery. Al­ter­na­tive ter­mi­nol­o­gy is often used, including the following: “primary/secondary”, “primary/replica” and “principal/agent”.

What are some common scenarios that the master/slave model is used for?

The master/slave model is used to do the following:

  • Regulate and co­or­di­nate bus systems for in­for­ma­tion exchange: The master co­or­di­nates and controls secondary devices and ensures that the data bus receives and processes in­for­ma­tion correctly.
  • Organize resources within a computer network: The master releases the resources available in the network according to a certain logic. This ensures that all par­tic­i­pants perform their tasks.
  • Create a piconet of terminals using Bluetooth: The master/slave model is used to create piconets. This is a [personal area network], which is a specific type of network that connects to end devices using Bluetooth.
  • Control access to a host system: A host computer provides resources within a computer network. The master regulates the par­tic­i­pants’ access.

How does the master/slave model work?

In the master/slave model, com­mu­ni­ca­tion is one-sided. The master can contact the slave, but it is not possible for the slave to com­mu­ni­cate with the master. Therefore, resources are always con­trolled uni­di­rec­tion­al­ly.

The master device or process grants the slave device or process the rights it needs. This may include access or com­mu­ni­ca­tion rights. The slave follows the master’s requests, while the master can act as it chooses.

What are the char­ac­ter­is­tics of master/slave?

In the master/slave model, the master device or process is in control. Slave devices and processes are always passive and must wait for the master’s per­mis­sion to use resources. Due to its position, the master is granted a larger range of functions and can control a large number of secondary devices and processes. The master can address the slaves with an address or a physical line. In certain systems, it is possible to define the master when ini­tial­iz­ing a system of equal stations.

What are the ad­van­tages and dis­ad­van­tages of the master/slave model?

The master/slave model is a well-known concept for con­trol­ling and reg­u­lat­ing shared resources. The main advantage is that complete access control puts the master at the center of system planning. This sim­pli­fies the process of resource sharing and also means that no unau­tho­rized in­for­ma­tion exchange can take place. The main dis­ad­van­tage of this model is the uni­di­rec­tion­al com­mu­ni­ca­tion. Since slaves are not able to com­mu­ni­cate directly with the master, polling is used to regularly check the status of hardware or software. This method, however, is con­sid­ered in­ef­fi­cient.

What are al­ter­na­tives to the master/slave model?

The master/slave model is not the only ar­chi­tec­ture model for resource control and al­lo­ca­tion. The client-server model is a well-known al­ter­na­tive. In this model, servers offer services that clients use. This is the most commonly used ar­chi­tec­ture model on the internet. For example, sending emails using SMTP, IMAP or POP, sending HTTP requests to a web server, and trans­fer­ring data to a server using File Transfer Protocol (FTP) are all carried out using the client-server model.

The peer-to-peer model is another al­ter­na­tive. The peer program rep­re­sents the server and client at the same time. Unlike the master/slave model, the peers have equal rights and perform both server and client tasks. Peer-to-peer ar­chi­tec­ture is used primarily for file-sharing services or grid computing.

Go to Main Menu