Docsity

Understanding Parallel Processing: SIMD, VLIW, and Multi-core Architectures - Prof. Leona , Study notes of Computer Architecture and Organization

Partial preview of the text

Download Understanding Parallel Processing: SIMD, VLIW, and Multi-core Architectures - Prof. Leona and more Study notes Computer Architecture and Organization in PDF only on Docsity!

Multi-Core & Parallel Processing

Chapter 9 – available on disk

I’m going to study with 9

friends... we’ll be done in

an hour.

I’ve gotta spend at least

10 hours studying for

the Comp 411 final!

TIPs Anyone?

Mega – 10

Giga – 10

Tera – 10

Peta – 10

Light travels about 1 ft / 10

secs in free space.

A Tera-Hertz uniprocessor could have no clock-to-clockpath longer than 300 microns…

We already know of problems that require greater than a TIP

(Simulations of weather, weapons, brains)

MIPS =

Clock Frequency (in MHz)

Clocks per Instruction

I guess that means

that there are 10

12

microphones in a

Megaphone?

Superscalar Parallelism

Multiple Functional Units (ALUs, Addr units, etc)

Multiple instruction dispatch

Dynamic Pipeline Scheduling

Speculative execution

Reservation

Station

Reservation

Station

Reservation

Station

Reserv. Stn

Popular Now– but

is the end near?

Explicit Parallelism

Decoding the Parallel Processor Alphabet Soup:

SIMD

- Single-Instruction-Multiple-Data

Unified control, Homogeneous processing elements

VLIW

- Very-Long-Instruction-Word

Unified control, Hetrogeneous processing elements

MIMD

- Multiple-Instruction-Multiple-Data

Distributed control

SMP

– Symmetric Multi-Processor

Distributed control, Shared memory, Homogenous PEs

Control

Communication

Processing Elements

Unified

Shared Memory

Homogeneous

Distributed

Message Passing

Heterogeneous

SIMD Coprocessing Units

SIMD data path added to a traditional CPU core

Register-only operandsCore CPU handles memory trafficPartitionable Datapaths for variable-sized

“PACKED OPERANDS”

Reg File

64-bit ALU

64

64

64

“Intel MMX”

L25 – Parallel Processing 8

SIMD Coprocessing Units

SIMD data path added to a traditional CPU core

Register-only operandsCore CPU handles memory trafficPartitionable Datapaths for variable-sized

“PACKED OPERANDS”

Reg File

32-bit ALU

64

64

64

32-bit ALU

“Intel MMX”

Two

32-bit ALUs

FA

a

b

s

c

o

c

i

FA

a

b

s

c

o

c

i

A32 B32 A31 B

S

S

...

...

SIMD Coprocessing Units

SIMD data path added to a traditional CPU core

Register-only operandsCore CPU manages memory trafficPartitionable Datapaths for variable-sized

“PACKED OPERANDS”

Reg File

64

64

64

“Intel MMX”

Eight

8-bit ALUs

8-bit ALU

8-bit ALU

8-bit ALU

8-bit ALU

8-bit ALU

8-bit ALU

8-bit ALU

8-bit ALU

MMX instructions:

PADDB - add bytesPADDW - add 16-bit wordsPADDD - add 32-bit words(unsigned & w/saturation)PSUB{B,W,D} – subtractPMULTLW – multiply lowPMULTHW – multiply highPMADDW – multiply & addPACK –UNPACK –PAND –POR -

L25 – Parallel Processing 11

VLIW Variant of SIMD Parallelism

A single-WIDE instruction controls multiple heterogeneous

datapaths.

Exposes parallelism to compiler (S/W vs. H/W)

Register File

Integer ALU

Floating Point

Adder

Integer ALU

Floating Point

Multiplier

FP Regs

Instr. Fetch

& Branch Prediction

Load Store

Unit

Instr

Data

Memory Interface

IOP

1

RC

1

RA

1

RB

1

IOP

2

RC

2

RA

2

RB

2

FOP FD

1

FA

1

FB

1

FD

2

FA

2

FB

2

MemOP

L25 – Parallel Processing 13

All processors share a common main memoryLeverages existing CPU designsEasy to migrate “Processes” to “Processors”Share data and programCommunicate through

shared memory

UpgradeableProblems:

ScalabilitySynchronization

mini

MIPS

mini

MIPS

mini

MIPS

mini

MIPS

M\mini

MIPS

MIMD Processing - Shared memory

Main Memory

Symmetric Multiprocessor Fantasies

If one processor is good, N processors are GREAT:

P

P

P

N

Shared Main Memory

IDEA:

• Run N processes, each on its OWN processor!• Processors compete for bus mastership, memory access• Bus

SERIALIZES

memory operations (via arbitration for mastership)

PROBLEM:

The Bus quickly becomes the BOTTLENECK

What are the Possible Outcomes?

SEQUENCE

A prints

B prints

x=3; print(y); y=4; print(x);

x=3; y=4; print(y); print(x);

x=3; y=4; print(x); print(y);

y=4; x=3; print(x); print(y);

y=4; x=3; print(y); print(x);

y=4; print(x); x=3; print(y);

Plausible execution sequences:

Process A

x = 3;print(y);

Process B

y = 4;print(x);

: x = 1

y = 2

: x = 1

y = 2

Uniprocessor Outcome

But, what are the possible outcomes if we ran Process A and

Process B on a

single timed-shared processor

SEQUENCE

A prints

B prints

x=3; print(y); y=4; print(x);

x=3; y=4; print(y); print(x);

x=3; y=4; print(x); print(y);

y=4; x=3; print(x); print(y);

y=4; x=3; print(y); print(x);

y=4; print(x); x=3; print(y);

Plausible Uniprocessor execution sequences:

Process A

x = 3;print(y);

Process B

y = 4;print(x);

Notice that theoutcome 2, 1does not appearin this list!

Cache Incoherence

PROBLEM: “stale” values in cache ...

Process B

y = 4;print(x);

Process A

x = 3;print(y);

Q: How does B know that A has changed the value of x?

P

$

1

:

x=3y=

Shared Memory

P

$

2

:

x= y=

x=3, y=

Does

WRITE-THRU

help?

_______!

Does

WRITE-THRU

help?

_______!

NO

The problem isnot thatmemory hasstale values,but that othercaches may!

Cache Coherence Solutions

Problem: A writes data into shared memory; B still sees “stale” cachedvalue.Solutions:

1. Don’t cache shared Read/Write pages.

COST: Longer access time to shared memory.

2. Attach cache to shared memory, not to processors...

... share the cache as well as the memory!COSTS: 1. ___________________

2. ___________________

3. Make caches talk to each other, maintain a consistent story.

Shared Memory

P

1

P

2

Bus Contention

Locality