Tải bản đầy đủ (.pdf) (37 trang)

Tin học ứng dụng trong công nghệ hóa học Parallelprocessing 4 5 flynn pararchitectures

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (746.2 KB, 37 trang )

Parallel Computer
Architectures
Thoai Nam


Outline
Flynn’s Taxonomy
 Classification of Parallel Computers Based
on Architectures


Khoa Khoa học và Kỹ thuật Máy tính – ĐH Bách Khoa TP.HCM


Flynn’s Taxonomy


Based on notions of instruction and data streams







SISD (a Single Instruction stream, a Single Data stream )
SIMD (Single Instruction stream, Multiple Data streams )
MISD (Multiple Instruction streams, a Single Data stream)
MIMD (Multiple Instruction streams, Multiple Data stream)

Popularity


– MIMD > SIMD > MISD

Khoa Khoa học và Kỹ thuật Máy tính – ĐH Bách Khoa TP.HCM


SISD


SISD
– Conventional sequential machines
IS : Instruction Stream
CU : Control Unit
MU : Memory Unit

DS : Data Stream
PU : Processing Unit

IS

I/O

CU

IS

PU

DS

MU


Khoa Khoa học và Kỹ thuật Máy tính – ĐH Bách Khoa TP.HCM


SIMD


SIMD
– Vector computers, processor arrays
– Special purpose computations
PE : Processing Element
PE1
IS

CU

Program loaded
from host

DS

LM : Local Memory
LM1

DS

IS
PEn

DS


LMn

DS

Data sets
loaded from host

SIMD architecture with distributed memory
Khoa Khoa học và Kỹ thuật Máy tính – ĐH Bách Khoa TP.HCM


MISD


MISD
– Systolic arrays
– Special purpose computations
IS

IS
Memory
(Program,
Data)

DS

CU1
IS
PU1


CU2
DS

IS
PU2

CUn
IS

DS

PUn

I/O
MISD architecture (the systolic array)
Khoa Khoa học và Kỹ thuật Máy tính – ĐH Bách Khoa TP.HCM

DS


MIMD


MIMD
– General purpose parallel computers
IS
IS
DS
CU1

PU1
I/O

I/O

CUn

IS

PUn

DS

Shared
Memory

IS
MIMD architecture with shared memory
Khoa Khoa học và Kỹ thuật Máy tính – ĐH Bách Khoa TP.HCM


Classification based on
Architecture








Pipelined Computers
Dataflow Architectures
Data Parallel Systems
Multiprocessors
Multicomputers

Khoa Khoa học và Kỹ thuật Máy tính – ĐH Bách Khoa TP.HCM


Pipeline Computers (1)




Instructions are divided into a number of steps
(segments, stages)
At the same time, several instructions can be
loaded in the machine and be executed in
different steps

Khoa Khoa học và Kỹ thuật Máy tính – ĐH Bách Khoa TP.HCM


Pipeline Computers (2)







IF – instruction fetch
ID – instruction decode and register fetch
EX- execution and effective address calculation
MEM – memory access
WB- write back

Instruction #

1

2

3

Instruction i

IF

ID

EX

IF

ID

EX

IF


ID

EX

MEM

WB

IF

ID

EX

MEM

WB

IF

ID

EX

MEM

Instruction i+1

Instruction i+2
Instruction i+3

Instruction i+4

4

5

6

Cycles
7

8

9

MEM WB
MEM WB

Khoa Khoa học và Kỹ thuật Máy tính – ĐH Bách Khoa TP.HCM

WB


Dataflow Architecture


Data-driven model
– A program is represented as a directed acyclic graph in
which a node represents an instruction and an edge
represents the data dependency relationship between the

connected nodes
– Firing rule
» A node can be scheduled for execution if and only if its
input data become valid for consumption



Dataflow languages
– Id, SISAL, Silage, LISP,...
– Single assignment, applicative(functional) language
– Explicit parallelism
Khoa Khoa học và Kỹ thuật Máy tính – ĐH Bách Khoa TP.HCM


Dataflow Graph
a
+
z = (a + b) * c

b

*

z

c
The dataflow representation of an arithmetic expression

Khoa Khoa học và Kỹ thuật Máy tính – ĐH Bách Khoa TP.HCM



Dataflow Computer


Execution of instructions is driven by data availability
– What is the difference between this and normal (control
flow) computers?



Advantages
– Very high potential for parallelism
– High throughput
– Free from side-effect



Disadvantages
– Time lost waiting for unneeded arguments
– High control overhead
– Difficult in manipulating data structures
Khoa Khoa học và Kỹ thuật Máy tính – ĐH Bách Khoa TP.HCM


Dataflow Representation
input d,e,f
c0 = 0
for i from 1 to 4
do
begin

ai := di / ei
bi := ai * fi
ci := bi + ci-1
end

d1

e1

d2

/

e2
/

a1
f1

*

+

e3

f2

f3

/


*

b2
c1

e4

a3

*

+

d4

/

a2

b1

c0

d3

a4
f4

*


b3
c2

output a, b, c
Khoa Khoa học và Kỹ thuật Máy tính – ĐH Bách Khoa TP.HCM

+

b4
c3

+

c4


Execution on
a Control Flow Machine
Assume all the external inputs are available before entering do loop
+ : 1 cycle, * : 2 cycles, / : 3 cycles,

a1

b1

c1

a2


b2

c2

a4

b4

Sequential execution on a uniprocessor in 24 cycles
How long will it take to execute this program on a dataflow
computer with 4 processors?

Khoa Khoa học và Kỹ thuật Máy tính – ĐH Bách Khoa TP.HCM

c4


Execution on
a Dataflow Machine
a1

b1

a2

b2

a3

b3


a4

b4

c1 c2 c3 c4

Data-driven execution on a 4-processor dataflow computer in 9 cycles
Can we further reduce the execution time of this program ?

Khoa Khoa học và Kỹ thuật Máy tính – ĐH Bách Khoa TP.HCM


Data Parallel Systems (1)


Programming model
– Operations performed in parallel on each element
of data structure
– Logically single thread of control, performs
sequential or parallel steps
– Conceptually, a processor associated with each
data element

Khoa Khoa học và Kỹ thuật Máy tính – ĐH Bách Khoa TP.HCM


Data Parallel Systems (2)



SIMD Architectural model
– Array of many simple, cheap processors with little
memory each
» Processors don’t sequence through instructions
– Attached to a control processor that issues
instructions
– Specialized and general communication, cheap global
synchronization

Khoa Khoa học và Kỹ thuật Máy tính – ĐH Bách Khoa TP.HCM


Vector Processors
Instruction set includes operations on vectors
as well as scalars
 2 types of vector computers


– Processor arrays
– Pipelined vector processors

Khoa Khoa học và Kỹ thuật Máy tính – ĐH Bách Khoa TP.HCM


Processor Array
A sequential computer connected with a set of identical processing
elements simultaneouls doing the same operation on different data.
Eg CM-200
Processor array
Front-end computer

Program and
Data Memory
CPU

I/O processor

Processing
element

Data path
Processing
element

Instruction
path
Processing
element

I/0

Data
memory

Interconnection network



Data
memory


Data
memory
I/0

Khoa Khoa học và Kỹ thuật Máy tính – ĐH Bách Khoa TP.HCM



×