Introduction to paralel and distributed computing

A simple computation problem

Final GPA calculation
Components of a computation problem
Computational tasks should be able to …
Execution framework should be able to …
Computing resources might be …
Parallelizing final GPA calculations

Parallel and distributed computing systems

Definition

A collection of individual computing devices that can communicate with each other. (Attiya and Welch, 2004)

How have parallel and distributed computing resources evolved?

Can we just throw more computers at the problem?

Definitions
Parallel speedup

$S(p) = \frac{sequential\ run\ time}{parallel\ run\ time} = \frac{t_s}{t_p}$

Example 01

A program takes 30 seconds to run on a single-core machine and 20 seconds to run on a dual-core machine. What is the speedup of this program?

Solution

$t_s=30$ $t_p=20$
$S=\frac{t_s}{t_p}=\frac{30}{20}=1.5$

Theoretical max
Amdahl’s Law

$S(p)=\frac{t_s}{t_p}=\frac{t_s}{f\times t_s + (1-f)\times t_s}=\frac{1}{f + \frac{1-f}{p}}=\frac{p}{f \times (p-1) + 1}$

Parallel efficiency

$E=\frac{\frac{p}{f \times (p-1) + 1}}{p}=\frac{1}{f \times (p-1) + 1}$

Example 02

Suppose that 4% of my application is serial. What is my predicted speedup according to Amdahl’s Law on 5 processors?

Solution

$f=0.04$ $p=5$ $S=\frac{p}{(p-1)f + 1}=\frac{5}{4 \times 0.04 +1}=4.3103$

Example 03

Suppose that I get a speedup of 8 when I run my application on 10 processors. According to Amdahl’s Law:

Solution

$S=8$

$p=10$

$S=\frac{p}{(p-1)f + 1}$

$8=\frac{10}{9f+1}$

$9f + 1 = \frac{10}{8}$

$f=\frac{1}{36}$

Solution

$f=\frac{1}{36}$

$p=20$

$S_{20}=\frac{p}{(p-1)f + 1}=\frac{20}{\frac{19}{36}+1} \approx 13.0909$

Solution

$E=\frac{1}{(p-1)f + 1}$

$E_5=\frac{1}{\frac{4}{36}+1} = 90\% $

$E_{20}=\frac{1}{\frac{19}{36} + 1} \approx 65.45\% $

Solution

$f=\frac{1}{36}$

$S_{\infty}=\lim_{p \to +\infty} \frac{p}{(p-1)f + 1} = \lim_{p \to +\infty} \frac{1}{\frac{p}{p-1}f + \frac{1}{p}}=\frac{1}{f}$

$S_{\infty}= 36$

Limiting factors of parallel speedup
If there is no limiting factor …

$S_{\infty}=\lim_{f \to 0} \frac{p}{(p-1)f + 1} = p$

$S \leq p$

Superlinear speedup

Parallel and distributed computing system architectures

Types of distributed computing systems
Streaming SIMD
Streaming SIMD
Shared memory
shared memory
Heterogeneous computing
GPU - graphics processing unit
GPU
FPGA - field programmable array
Co-processors
Message passing distributed computing
Message passing

Benchmarking

Benchmarking suites
Ranking systems