ArticleslgStudy

computer science

Analysis of parallel algorithms

Analysis of parallel algorithms 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 Analysis of parallel algorithms rather than just read about it. In short: In computer science, analysis of parallel algorithms is the process of finding the computational complexity of algorithms executed in parallel – the amount of time, storage, or other resources needed to execute them. In many respects, analysis of parallel algorithms is similar to the analysis of sequential algorithms, but is generally more involved because one must reason about the behavior of multiple cooperating t…

Key takeaways

  • Analysis of parallel algorithms 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 Analysis of parallel algorithms to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Analysis of parallel algorithms from memory before moving on to harder problems.

Reference excerpt

In computer science, analysis of parallel algorithms is the process of finding the computational complexity of algorithms executed in parallel – the amount of time, storage, or other resources needed to execute them. In many respects, analysis of parallel algorithms is similar to the analysis of sequential algorithms, but is generally more involved because one must reason about the behavior of multiple cooperating threads of execution. One of the primary goals of parallel analysis is to understand how a parallel algorithm's use of resources (speed, space, etc.) changes as the number of processors is changed.

Background A so-called work-time (WT) (sometimes called work-depth, or work-span) framework was originally introduced by Shiloach and Vishkin for conceptualizing and describing parallel algorithms. In the WT framework, a parallel algorithm is first described in terms of parallel rounds. For each round, the operations to be performed are characterized, but several issues can be suppressed. For example, the number of operations at each round need not be clear, processors need not be mentioned and any information that may help with the assignment of processors to jobs need not be accounted for. Second, the suppressed information is provided. The inclusion of the suppressed information is guided by the proof of a scheduling theorem due to Brent, which is explained later in this article. The WT framework is useful since while it can greatly simplify the initial description of a parallel algorithm, inserting the details suppressed by that initial description is often not very difficult. For example, the WT framework was adopted as the basic presentation framework in the parallel algorithms books (for the parallel random-access machine PRAM model)

and, as well as in the class notes . The overview below explains how the WT framework can be used for analyzing more general parallel algorithms, even when their description is not available within the WT framework.

Definitions

Suppose computations are executed on a machine that has p processors. Let Tp denote the time that expires between the start of the computation and its end. Analysis of the computation's running time focuses on the following notions:

The work of a computation executed by p processors is the total number of primitive operations that the processors perform. Ignoring communication overhead from synchronizing the processors, this is equal to the time used to run the computation on a single processor, denoted T1. The depth or span is the length of the longest series of operations that have to be performed sequentially due to data dependencies (the critical path). The depth may also be called the critical path length of the computation. Minimizing the depth/span is important in designing parallel algorithms, because the depth/span determines the shortest possible execution time. Alternatively, the span can be defined as the time T∞ spent computing using an idealized machine with an infinite number of processors. The cost of the computation is the quantity pTp. This expresses the total time spent, by all processors, in both computing and waiting. Several useful results follow from the definitions of work, span and cost:

Work law. The cost is always at least the work: pTp ≥ T1. This follows from the fact that p processors can perform at most p operations in parallel. Span law. A finite number p of processors cannot outperform an infinite number, so that Tp ≥ T∞. Using these definitions and laws, the following measures of performance can be given:

Speedup is the gain in speed made by parallel execution compared to sequential execution: Sp = T1 / Tp. When the speedup is Ω(p) for p processors (using big O notation), the speedup is linear, which is optimal in simple models of computation because the work law implies that T1 / Tp ≤ p (super-linear speedup can occur in practice due to memory hierarchy effects). The situation T1 / Tp = p is called perfect linear speedup. An algorithm that exhibits linear speedup is said to be scalable. Analytical expressions for the speedup of many important parallel algorithms are presented in this book. Efficiency is the speedup per processor, Sp / p. Parallelism is the ratio T1 / T∞. It represents the maximum possible speedup on any number of processors. By the span law, the parallelism bounds the speedup: if p > T1 / T∞, then: T1Tp≤T1T∞<p. The slackness is T1 / (pT∞). A slackness less than one implies (by the span law) that perfect linear speedup is impossible on p processors.

Execution on a limited number of processors Analysis of parallel algorithms is usually carried out under the assumption that an unbounded number of processors is available. This is unrealistic, but not a problem, since any computation that can run in parallel on N processors can be executed on p < N processors by letting each processor execute multiple units of work. A result called Brent's law states that one can perform such a "simulation" in time Tp, bounded by

Tp≤TN+T1−TNp, or, less precisely,

Tp=O(TN+T1p). An alternative statement of the law bounds Tp above and below by

T1p≤Tp≤T1p+T∞. showing that the span (depth) T∞ and the work T1 together provide reasonable bounds on the computation time.

References

Worked examples

Example 1 — a first encounter with Analysis of parallel algorithms

Start with the simplest possible case. Write down what Analysis of parallel algorithms 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 Analysis of parallel algorithms 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 Analysis of parallel algorithms 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 Analysis of parallel algorithms

In research
Analysis of parallel algorithms 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 Analysis of parallel algorithms 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
Analysis of parallel algorithms is common in secondary-school and first-year university syllabi. It links to neighbouring topics Analysis of parallel algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for Analysis of parallel algorithms 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 “Analysis of parallel algorithms” →

How to study Analysis of parallel algorithms in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Analysis of parallel algorithms 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 Analysis of parallel algorithms out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Analysis of parallel algorithms in simple terms?

In computer science, analysis of parallel algorithms is the process of finding the computational complexity of algorithms executed in parallel – the amount of time, storage, or other resources needed to execute them. In many respects, analysis of parallel algorithms is similar to the analysis of se…

Why does Analysis of parallel algorithms 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 Analysis of parallel algorithms?

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 Analysis of parallel algorithms.

Tags

  • Analysis of parallel algorithms

Keep exploring