Skip to main content Accessibility help
×
Hostname: page-component-78c5997874-ndw9j Total loading time: 0 Render date: 2024-11-09T16:44:12.275Z Has data issue: false hasContentIssue false

4 - Designing Parallel Algorithms

Published online by Cambridge University Press:  06 January 2017

Zbigniew J. Czech
Affiliation:
Silesia University of Technology, Gliwice, Poland
Get access

Summary

STEPS OF DESIGNING

As we stated in Section 3.1, a parallel algorithm is composed of a number of algorithm components. These components are intended to solve the subproblems into which the original problem has been divided. Normally, the components cooperate with each other using intermediate results of computation as well as synchronize their action. The desired output of the parallel algorithm is a composition of results computed by the algorithm components. Since the subproblems are solved by the components of a parallel program called tasks, we will use the terms subproblem and task interchangeably.

The process of designing a parallel algorithm consists of four steps:

  1. □ decomposition of a computational problem into tasks that can be executed simultaneously, and development of sequential algorithms for individual tasks;

  2. □ analysis of computation granularity;

  3. □ minimizing the cost of the parallel algorithm;

  4. □ assigning tasks to processors executing the parallel algorithm.

The following sections characterize these activities in more detail. In addition, we present some general methods for designing parallel algorithms, such as the method of data parallelism, the method of functional parallelism, the method of task pool, the method of master and slaves, and the method of pipelining. These methods differ from each other with respect to ways of exploiting potential parallelism in the computation that solve the problem, as well as with respect to the ways of assigning processors the tasks to be executed.

PROBLEM DECOMPOSITION

4.2.1 Types of Decomposition

Dividing a computational problem into tasks, called decomposition or partitioning, can be done in several ways. We will discuss them on examples

Example 4.1 Evaluation of test results

Let us examine a problem of evaluation of multiple-choice test results. Suppose that the test results are written on n sheets, where on each sheet there are m questions with marked answers.

Type
Chapter
Information
Publisher: Cambridge University Press
Print publication year: 2017

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure [email protected] is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Available formats
×