lect12.frm - Datorarkitektur I F 12 1 Datorarkitektur I F...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Datorarkitektur I Fö 12- 1 Petru Eles, IDA, LiTH ARCHITECTURES FOR PARALLEL COMPUTATION 1. Why Parallel Computation 2. Parallel Programs 3. A Classification of Computer Architectures 4. Array Processors 5. Multiprocessors 6. Multicomputers 7. Vector Processors Datorarkitektur I Fö 12- 2 Petru Eles, IDA, LiTH Wh y P arallel Computation? The need for high performance! T w o main f actors contr ib ute to high perf or mance of moder n processors: 1. Fast circuit technology 2. Architectural features: - large caches - multiple fast buses - pipelining - superscalar architectures (multiple funct. units) However Computers running with a single CPU, often are not able to meet performance needs in certain areas: - Fluid flow analysis and aerodynamics; - Simulation of large complex systems, for exam- ple in physics, economy, biology, technic; - Computer aided design; - Multimedia. Applications in the above domains are characterized by a very high amount of numerical computation and/or a high quantity of input data. Datorarkitektur I Fö 12- 3 Petru Eles, IDA, LiTH A Solution: P arallel Computer s One solution to the need for high performance: architectures in which several CPU s are running in order to solve a certain application . Such computers have been organized in very different ways. Some key features: - number and complexity of individual CPUs - availability of common (shared memory) - interconnection topology - performance of interconnection network - I/O devices - - - - - - - - - - - - - - Datorarkitektur I Fö 12- 4 Petru Eles, IDA, LiTH P arallel Pr ograms 1. P ar allel sor ting Unsorted-1 Unsorted-4 Unsorted-3 Unsorted-2 Sorted-1 Sorted-4 Sorted-3 Sorted-2 Sort-1 Sort-4 Sort-3 Sort-2 Merge SORTED
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Datorarkitektur I Fö 12- 5 Petru Eles, IDA, LiTH Parallel Programs (cont’d) A possib le prog r am f or par allel sor ting: var t: array [1. .1000] of integer; - - - - - - - - - - - procedure sort(i,j:integer); -sort elements between t[i] and t[j]- end sort; procedure merge; - - merge the four sub-arrays - - end merge; - - - - - - - - - - - begin - - - - - - - - cobegin sort(1,250) | sort(251,500) | sort(501,750) | sort(751,1000) coend ; merge; - - - - - - - - end ; Datorarkitektur I Fö 12- 6 Petru Eles, IDA, LiTH Parallel Programs (cont’d) 2. Matr ix addition: var a: array [1. .n,1. .m] of integer; b: array [1. .n,1. .m] of integer; c: array [1. .n,1. .m] of integer; i:integer - - - - - - - - - - - begin - - - - - - - - for i:=1 to n do for j:= 1 to m do c[i,j]:=a[i,j]+b[i,j]; end for end for - - - - - - - - end ; a 11 a 12 a 13 ⋅⋅⋅⋅ a 1n a 21 a 22 a 23 a 2n ⋅⋅⋅⋅ a m1 a m2 a m3 ⋅⋅⋅⋅ a mn b 11 b 12 b 13 b 1n b 21 b 22 b 23 b 2n ⋅⋅⋅⋅ b m1 b m2 b m3 ⋅⋅⋅⋅ b mn c 11 c 12 c 13 c 1n c 21 c 22 c 23 c 2n ⋅⋅⋅⋅ c m1 c m2 c m3 ⋅⋅⋅⋅ c mn += Datorarkitektur I Fö 12- 7 Petru Eles, IDA, LiTH Parallel Programs (cont’d) Matr ix addition - v ector computation v ersion: var a: array [1. .n,1. .m] of integer; b: array [1. .n,1. .m] of integer; c: array [1. .n,1. .m] of integer; i,j:integer - - - - - - - - - - - begin - - - - - - - - for i:=1 to n do c[i,1:m]:=a[i,1:m]+b[i,1:m]; end for ; - - - - - - - - end ; Or e ven so : begin - - - - - - - - c[1:n,1:m]:=a[1:n,1:m]+b[1:n,1:m]; - - - - - - - - end ; Datorarkitektur I Fö 12- 8 Petru Eles, IDA, LiTH Parallel Programs (cont’d) Pipeline model computation: x y 5 =4 5 x log + × a 45 x log + = y y 5 = a × a y x
Background image of page 2
Datorarkitektur I Fö 12- 9
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

lect12.frm - Datorarkitektur I F 12 1 Datorarkitektur I F...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online