Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 4

Unit 6 Introduction to Parallelism

AMDAHLS LAW:
Amdahls Law state that if the system is using either a pure sequential mode on one processor with the probability f or in a full parallel mode using p no. of processor with the probability 1- f then the speed of the expression is given as: S (p) = ____p____ where, f fraction of sequential work 1 + (p-1) f What is the maximum Speed? Several factors will appear as overhead in the parallel version and limit the speedup, notably: Periods when not all of the processors can be performing useful work and simply idle. Extra computation in the parallel version Communication time

ts fts (1-f)ts
.

. . . . . .

tp

(1-f)ts / p

Speedup Factor: S (p) = Execution time using one processor (best sequential algorithm) = ts Execution time using a multiprocessor with p processors tp Where, ts is execution time on a single processor and tp is execution time on a multiprocessor; S (p) gives increase in speed by using multiprocessor.

Unit 6 Introduction to Parallelism Speedup factor can also be cast in terms of computational steps: S (p) = _Number of Computational Steps using one processor__ Number of parallel computational steps with p processors

Thus,

S (p) =

t = fts + (1 f) ts/p

p p 1+(p-1)f

For example: Let f = 0.1 CASE 1: p = 2 S (p) = ____2_____ 1 + (2 1) (0.1)

_2___ 1 + 0.1

= _20 11 = 200 29

CASE 2: p = 20 S (p) = ____20_____ = _20___ 1 + (20 1) (0.1) 1 + (19) (0.1) CASE 3: p = 2 S (p) = ____200_____ = 1 + (200 1) (0.1)

____200___ = 2000 1 + (199) (0.1) 129

This implies that after certain limit the increase in no. of processors is not proportional to increase in speed. Thus, Amdahls law states that after certain limit the increase in no. of processor doesnt means a must increase in processing. Proof of Amdahls Law: 1) Degree of Parallelism (i): It is the total no. of processor used at a given time for executing some work. 2) Maximum Parallelism (m): Maximum no. of processor we can use at one time to execute a process. 3) Total no. of processor (n): It is the sum of all the processor which are available to us for executing some work. 4) Work done: Let Wi be the total work done by using I no. of processor and is the computing capacity of each processor. Now, the total work done at a given time is equal to: t2

W=

DOP (t) dt
t1

Wi = I . . ti
i=1

Unit 6 Introduction to Parallelism m

ti (1) = 1 Wi
i=1

(i=1)

ti () = 1 Wi i S () = ti (1) ti ()
i=1

= 1 Wi
i=1

1 Wi i
i=1

Maximum no. of processor: m

S (n) = W0
i=1

Wi. (i/n) i = S ()
i=1

(i/n)
i=1

Therefore,

S(n) S ()
When processor increases speed up decreases.

Unit 6 Introduction to Parallelism

Effect of Amdahls Law of parallelism: 1. On LOAD

Work Done

1 2 3 4 5 No. of Processor 2. On TIME

7 8

1 2 3 4 5 No. of Processor 3. On SPEEDUP

Time

Speedup

10% 20% 30% 40% 50% Sequential Fraction


4

You might also like