ArticleslgStudy

computer science

Distributed algorithm

Distributed algorithm is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Distributed algorithm rather than just read about it. In short: A distributed algorithm is an algorithm designed to run on computer hardware constructed from interconnected processors. Distributed algorithms are used in different application areas of distributed computing, such as telecommunications, scientific computing, distributed information processing, and real-time process control.

Key takeaways

  • Distributed algorithm belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Distributed algorithm to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Distributed algorithm from memory before moving on to harder problems.

Reference excerpt

A distributed algorithm is an algorithm designed to run on computer hardware constructed from interconnected processors. Distributed algorithms are used in different application areas of distributed computing, such as telecommunications, scientific computing, distributed information processing, and real-time process control. Standard problems solved by distributed algorithms include leader election, consensus, distributed search, spanning tree generation, mutual exclusion, and resource allocation. Distributed algorithms are a sub-type of parallel algorithm, 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 that can be performed, and the level of timing synchronization between separate processes.

Standard problems Atomic commit 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 and the three-phase commit protocol. 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 v, then every correct process decides v. Integrity: every correct process decides at most one value, and if it decides some value v, then v must have been proposed by some process. Agreement: if a correct process decides v, then every correct process decides v. Common algorithms for solving consensus are the Paxos algorithm and the Raft algorithm. Distributed search Leader election 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 Non-blocking data structures 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 Spanning tree generation Symmetry breaking, e.g. vertex coloring

References

Further reading Christian Cachin; Rachid Guerraoui; Luís Rodrigues (2011), Introduction to Reliable and Secure Distributed Programming (2. ed.), Springer, Bibcode:2011itra.book.....C, ISBN 978-3-642-15259-7 C. Rodríguez, M. Villagra and B. Barán, Asynchronous team algorithms for Boolean Satisfiability, Bionetics2007, pp. 66–69, 2007.

External links Media related to Distributed algorithms at Wikimedia Commons MIT Open Courseware - Distributed Algorithms

Worked examples

Example 1 — a first encounter with Distributed algorithm

Start with the simplest possible case. Write down what Distributed algorithm claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Distributed algorithm before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Distributed algorithm ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Distributed algorithm

In research
Distributed algorithm appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Distributed algorithm in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Distributed algorithm is common in secondary-school and first-year university syllabi. It links to neighbouring topics Distributed algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for Distributed algorithm outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Distributed algorithm” →

How to study Distributed algorithm in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Distributed algorithm means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Distributed algorithm out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Distributed algorithm in simple terms?

A distributed algorithm is an algorithm designed to run on computer hardware constructed from interconnected processors. Distributed algorithms are used in different application areas of distributed computing, such as telecommunications, scientific computing, distributed information processing, and…

Why does Distributed algorithm matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Distributed algorithm?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Distributed algorithm.

Tags

  • Distributed algorithms

Keep exploring