Docsity

Multithreading Models: Coarse-Grain, Fine-Grain, and Simultaneous Multithreading, Study notes of Introduction to Sociology

Partial preview of the text

Download Multithreading Models: Coarse-Grain, Fine-Grain, and Simultaneous Multithreading and more Study notes Introduction to Sociology in PDF only on Docsity!

Multithreading Models^ „

Coarse-grain – switch contexts (typicallyseveral cycles) on long-latency event.^ „

MIT Alewife

„

Fine-grain – switch contexts every cycle.^ „

HEP, Tera, Sun Niagara

„

Simultaneous Multithreading^ „

Compaq 21464, Intel Pentium 4, Power 5, 6

Coarse-grain multithreading

Fine-grain multithreading

Simultaneous Multithreading

MIT Alewife

Scalability^ „

Who are the arch enemies ofscalability?scalability?

Scalability – Four ProngedScalability

Four Pronged

Approach

Programming Model?

Block Multithreading^ „

Aka coarse-grain multithreading

Block

(CG) Multithreading

What does it do well?

h

d

’^

d

ll

What doesn’t it do well?

Simultaneous Multithreading

MotivationMotivation

100 90 80

mem conflict long fp

cles

70 60

long fpshort fplong int short int load delays

issue cyc

50 40 30

i^

h^

i

load delayscontrol hazardsbranch mispred. dcache miss

nt of total

30 20 10

icache missdtlb missitlb missprocessor busy

Percen

0

H

d

M ltith

di

H

ardware Multithreading

Conventional

Processor

Multithreaded

Processor

am e

eam

Processor

Processor

PC

PC

PC

PC

ction stre

ction stre

PC regs

PCregs

PCregsPC

PCregs

instruc

instruc

PC regs

CPU

CPU

Superscalar Execution

Issue Slots

s) e proc cycleTime (

Superscalar Execution

Issue Slots

s) e proc cycleTime (

Vertical waste

Superscalar Execution

Issue Slots

s) e

Horizontal waste

proc cycle

Horizontal waste

Time (

Vertical waste

The Potential for SMT

77 6 er Cycle) p

Simultaneous Multithreading

5 4 tructions p

3 2 hput (Ins g

Fine-Grain Multithreading

1 0 Throug

Conventional Superscalar

1

2

3

4

5

6

7

8

Number of Threads

Goals^ We had three primary goals for this architecture:

1 Minimize the architectural impact on conventional1. Minimize the architectural impact on conventional

superscalar design.

2. Minimize the performance impact on a single

thread.

3. Achieve significant throughput gains with many

threads.

A Conventional Superscalar ArchitectureA

Conventional Superscalar Architecture

F t h

floating pointinstruction queue

fpunits

PC

FetchUnit

DataCache

fpreg’s

Instruction Cache

i t

i t

Decode

Register

integerinstruction queue

int.units

int/ld-storeunits

integerreg’s

Decode

g Renaming

units

  • Fetch up to 8i^

t^

ti

l

  • Issue 3 floating

i t 6 i t

  • Out-of-order,

l ti

instructions per cycle

point, 6 integerinstructions per cycle

speculativeexecution

An SMT ArchitectureAn

SMT Architecture

F t h

floating pointinstruction queue

fpunits

FetchUnit

DataCache

fpreg’s

PC

Instruction Cache

i t

i t

Decode

Register

integerinstruction queue

int.units

int/ld-storeunits

integerreg’s

Decode

g Renaming

units

  • Fetch up to 8i^

t^

ti

l

  • Issue 3 floating

i t 6 i t

  • Out-of-order,

l ti

instructions per cycle

point, 6 integerinstructions per cycle

speculativeexecution

Performance of the Naïve Design

er Cycle) P

ructions P t

hput (Inst g

Unmodified Superscalar

Throug

Number of Threads

Bottlenecks of the Baseline Architecture^ „

Instruction queue full conditions (12-21% ofcycles)^ „

Lack of parallelism in the queue.

„

Fetch throughput (4.2 instructions per cyclewhen queue not full)

Improving Fetch Throughput^ „

The fetch unit in an SMT architecturehas two distinct advantages over ahas two distinct advantages over aconventional architecture.^ „„^ „

Improving Fetch Throughput^ „

The fetch unit in an SMT architecturehas two distinct advantages over ahas two distinct advantages over aconventional architecture.^ „

Can fetch from multiple threads at once.

„

Can fetch from multiple threads at once.

„

Can choose which threads to fetch.

HEP Multithreading

CPU

PSW

PSW

PSW

PSW

PSW

PSW

PSW

PSW

Tera Multithreading

Cool Tera Features^ „

Full/empty bits on memory

„

Randomized memory (why??)

„

No bypassing

„

Explicit-dependence lookahead

„

LIW

„

No caches

„

High-bandwidth networkWhi h

f^

h

l^

d

l i h

di

„

Whi

ch of these are related to multithreading?

Other SMT Research (UCSDOther SMT Research (UCSDemphasis)^ „

Compilation issues, including instruction layout foricache performance.Multiple path execution

„^

Multiple

-path execution

„^

Symbiotic job scheduling

„^

Synchronization and parallelization

y

p

„^

Multithreading and power

„^

Helper threads – speculative precomputationM lti

/^

ltith

d d

l^

t^

d

ltith

d d

„^

M

ulticore/multithreaded, clustered multithreaded

„^

Multithreaded value prediction

„^

Event

-driven compilation

Event driven compilation

Other interesting multithreadedOther

interesting multithreaded

research^ „

Speculative multithreading

Fault tolerance

Fault tolerance

slipstreaming

Summary^ „

Why simultaneous multithreading?

Long-term solution?

Long-term solution?

When won’t it work?

h

What next?