Master vs Slave
Master/Slave is a communication model in which a device or a process designated as a Master possesses control of other device/devices or processes called the slave/slaves. Simply, a master is a device or a process that controls other devices or processes and a slave is a device or a process that is controlled by another device or a process. Communications based on master/slave model occurs in many places. Some examples are in database replications, devices connected to a bus in a computer, etc.
What is Master?
Simply, a master is a device or a process that controls other devices or processes. The direction of the control always flows from master to slave. For example, in database replication (copying data between databases to maintain consistency), the master database is considered as the party with all the authority. The master database records all the updates to the data and all the other databases are later synchronized with the master. The term master is also used in hard drive arrangements using PATA (Parallel Advanced Technology Attachment). But in this situation, master is just used as another name for the device 0 and the master (device 0) in this situation does not possess any control over the device named as the slave. But the device designated as the master will be appeared first to the BIOS or the operating system. Designating a hard drive as master is typically done by having a specific jumper setting.
What is Slave?
Slave is a device or a process that is controlled by another device or a process (called the master). For example, in database replication, the database considered as the slave will use the updates recorded in the master database to synchronize its data with the master. When the slave receives the updates from the master successfully, it informs the master by outputting a message. This would allow master to send more updates to the slave. Furthermore, in PATA hard drive arrangements, the term slave is used as a synonym for device 1. But in this situation the master (device 0) does not have any control over the device designated as the slave. But when SATA (Serial Advanced Technology Attachment) replaced the traditional PATA drives, designating hard drives as master and slave was not used any more.
What is the difference between Master and Slave?
In the master/slave communication model, master is a device or a process that has control over other devices or processes, whereas a slave is a device or a process that is controlled by another device (called the master). In database replication, master database records all the updates in the data and sends them to the databases designated as the slaves. The slaves can only inform the master whether they received the updates successfully and they have no control to stop the updates coming to them. But, there is a difference in the usage of master/slave in PATA hard drive arrangements. Here, the device designated as the master has no control over the device designated as the slave.