A distributed algorithm is an
algorithm
In mathematics and computer science, an algorithm () is a finite sequence of Rigour#Mathematics, mathematically rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algo ...
designed to run on
computer hardware
Computer hardware includes the physical parts of a computer, such as the central processing unit (CPU), random-access memory (RAM), motherboard, computer data storage, graphics card, sound card, and computer case. It includes external devices ...
constructed from interconnected
processors. Distributed algorithms are used in different application areas of
distributed computing
Distributed computing is a field of computer science that studies distributed systems, defined as computer systems whose inter-communicating components are located on different networked computers.
The components of a distributed system commu ...
, such as
telecommunications
Telecommunication, often used in its plural form or abbreviated as telecom, is the transmission of information over a distance using electronic means, typically through cables, radio waves, or other communication technologies. These means of ...
,
scientific computing
Computational science, also known as scientific computing, technical computing or scientific computation (SC), is a division of science, and more specifically the Computer Sciences, which uses advanced computing capabilities to understand and s ...
, distributed
information processing
In cognitive psychology, information processing is an approach to the goal of understanding human thinking that treats cognition as essentially Computing, computational in nature, with the mind being the ''software'' and the brain being the ''hard ...
, and real-time
process control
Industrial process control (IPC) or simply process control is a system used in modern manufacturing which uses the principles of control theory and physical industrial control systems to monitor, control and optimize continuous Industrial processe ...
. Standard problems solved by distributed algorithms include
leader election
In distributed computing, leader election is the process of designating a single Process (computing), process as the organizer of some task distributed among several computers (nodes). Before the task has begun, all network nodes are either unawa ...
,
consensus, distributed
search
Searching may refer to:
Music
* "Searchin', Searchin", a 1957 song originally performed by The Coasters
* Searching (China Black song), "Searching" (China Black song), a 1991 song by China Black
* Searchin' (CeCe Peniston song), "Searchin" (C ...
,
spanning tree
In the mathematical field of graph theory, a spanning tree ''T'' of an undirected graph ''G'' is a subgraph that is a tree which includes all of the vertices of ''G''. In general, a graph may have several spanning trees, but a graph that is no ...
generation,
mutual exclusion
In computer science, mutual exclusion is a property of concurrency control, which is instituted for the purpose of preventing race conditions. It is the requirement that one thread of execution never enters a critical section while a concurr ...
, and
resource allocation
In economics, resource allocation is the assignment of available resources to various uses. In the context of an entire economy, resources can be allocated by various means, such as markets, or planning.
In project management, resource allocatio ...
.
Distributed algorithms are a sub-type of
parallel algorithm
In computer science, a parallel algorithm, as opposed to a traditional serial algorithm, is an algorithm which can do multiple operations in a given time. It has been a tradition of computer science to describe serial algorithms in abstract mach ...
, typically executed
concurrently, with separate parts of the algorithm being run simultaneously on independent processors, and having limited information about what the other parts of the algorithm are doing. One of the major challenges in developing and implementing distributed algorithms is successfully coordinating the behavior of the independent parts of the algorithm in the face of processor failures and unreliable communications links. The choice of an appropriate distributed algorithm to solve a given problem depends on both the characteristics of the problem, and characteristics of the system the algorithm will run on such as the type and probability of processor or link failures, the kind of
inter-process communication
In computer science, interprocess communication (IPC) is the sharing of data between running Process (computing), processes in a computer system. Mechanisms for IPC may be provided by an operating system. Applications which use IPC are often cat ...
that can be performed, and the level of timing synchronization between separate processes.
Standard problems
;
Atomic commit
In the field of computer science, an atomic Commit (data management), commit is an operation that applies a set of distinct changes as a single operation. If the changes are applied, then the atomic commit is said to have succeeded. If there is a f ...
:An atomic commit is an operation where a set of distinct changes is applied as a single operation. If the atomic commit succeeds, it means that all the changes have been applied. If there is a failure before the atomic commit can be completed, the "commit" is aborted and no changes will be applied.
:Algorithms for solving the atomic commit problem include the
two-phase commit protocol
In transaction processing, databases, and computer networking, the two-phase commit protocol (2PC, ''tupac'') is a type of Atomic commit, atomic commitment protocol (ACP). It is a distributed algorithm that coordinates all the processes that pa ...
and the
three-phase commit protocol
In computer networking and distributed databases, the three-phase commit protocol (3PC) is a distributed algorithm that ensures all nodes in a system agree to commit or abort a transaction. It improves upon the two-phase commit protocol (2PC) by ...
.
;
Consensus
:Consensus algorithms try to solve the problem of a number of processes agreeing on a common decision.
:More precisely, a Consensus protocol must satisfy the four formal properties below.
:* Termination: every correct process decides some value.
:* Validity: if all processes propose the same value
, then every correct process decides
.
:* Integrity: every correct process decides at most one value, and if it decides some value
, then
must have been proposed by some process.
:* Agreement: if a correct process decides
, then every correct process decides
.
:Common algorithms for solving consensus are the
Paxos algorithm
Paxos is a family of protocols for solving Consensus (computer science), consensus in a network of unreliable or fallible processors.
Consensus is the process of agreeing on one result among a group of participants. This problem becomes difficult ...
and the
Raft algorithm.
; Distributed search
;
Leader election
In distributed computing, leader election is the process of designating a single Process (computing), process as the organizer of some task distributed among several computers (nodes). Before the task has begun, all network nodes are either unawa ...
:Leader election is the process of designating a single process as the organizer of some task distributed among several computers (nodes). Before the task is begun, all network nodes are unaware of which node will serve as the "leader," or coordinator, of the task. After a leader election algorithm has been run, however, each node throughout the network recognizes a particular, unique node as the task leader.
;
Mutual exclusion
In computer science, mutual exclusion is a property of concurrency control, which is instituted for the purpose of preventing race conditions. It is the requirement that one thread of execution never enters a critical section while a concurr ...
;
Non-blocking data structures
In computer science, an algorithm is called non-blocking if failure or suspension of any thread cannot cause failure or suspension of another thread; for some operations, these algorithms provide a useful alternative to traditional blocking i ...
;
Reliable Broadcast
:Reliable broadcast is a communication primitive in distributed systems. A reliable broadcast is defined by the following properties:
:* Validity - if a correct process sends a message, then some correct process will eventually deliver that message.
:* Agreement - if a correct process delivers a message, then all correct processes eventually deliver that message.
:* Integrity - every correct process delivers the same message at most once and only if that message has been sent by a process.
:A reliable broadcast can have sequential, causal or total ordering.
;
Replication
;
Resource allocation
In economics, resource allocation is the assignment of available resources to various uses. In the context of an entire economy, resources can be allocated by various means, such as markets, or planning.
In project management, resource allocatio ...
;
Spanning tree
In the mathematical field of graph theory, a spanning tree ''T'' of an undirected graph ''G'' is a subgraph that is a tree which includes all of the vertices of ''G''. In general, a graph may have several spanning trees, but a graph that is no ...
generation
; Symmetry breaking, e.g.
vertex coloring
References
Further reading
*
*C. Rodríguez, M. Villagra and B. Barán, , Bionetics2007, pp. 66–69, 2007.
External links
*
MIT Open Courseware - Distributed Algorithms
{{DEFAULTSORT:Distributed Algorithms