Docsity

Computer Systems Architecture: Lecture 24 - Multiprocessors, cont. - Prof. Alan L. Sussman, Assignments of Computer Science

Toggle sidebar
bg1
CMSC 411
CMSC
411
Computer Systems Architecture
Lecture 24
Multiprocessors, cont.
Multiprocessors,
cont.
Alan Sussman
Administrivia
•Homework 6 due Tuesday
Ptifil tdbT d
•
P
rac
ti
ce
fi
na
l
exam pos
t
e
d
b
y
T
ues
d
ay
•Course evaluations open, at
htt
p
://www.CourseEvalUM.umd.edu
p
•Final exam Tuesday, May 19, 1:30-3:30PM
CMSC 411 -24 (some from Patterson, Sussman, others) 2
Outline
•Review
•Coherence
•Write Consistency
•Administrivia
•Snooping
•Building Blocks
•Snooping protocols and examples
•Coherence traffic and Performance on MP
•Directory-based protocols and examples
•Conclusion
CMSC 411 -24 (some from Patterson, Sussman, others) 3
Example
P1 P2 Bus Directory Memor
y
step State Addr Valu
e
State Addr Valu
e
Action Proc. Addr Value Addr State {Procs} Value
P1: Write 10 to A1
Processor 1 Processor 2 Interconnect MemoryDirectory
P1: Read A1
P2: Read A1
P2: Write 40 to A2
P2: Write 20 to A1
A1 and A2 map to the same cache block
CMSC 411 -24 (some from Patterson, Sussman, others) 4
pf3
pf4
pf5

Partial preview of the text

Download Computer Systems Architecture: Lecture 24 - Multiprocessors, cont. - Prof. Alan L. Sussman and more Assignments Computer Science in PDF only on Docsity!

CMSC 411CMSC^411 Computer Systems ArchitectureLecture 24Multiprocessors, cont.Multiprocessors, cont.Alan [email protected]

Administrivia^ •^ Homework 6 due TuesdayP^ ti^ fi^ l^

t d b^ T^ d

•^ Practice final exam posted by Tuesday •^ Course evaluations open, athttp://www.CourseEvalUM.umd.edup •^ Final exam Tuesday, May 19, 1:30-3:30PMCMSC 411 - 24 (some from Patterson, Sussman, others)

Outline •^ Review •^ Coherence •^ Write Consistency •^ Administrivia •^ Snooping •^ Building Blocks •^ Snooping protocols and examples •^ Coherence traffic and Performance on MP •^ Directory-based protocols and examples •^ ConclusionCMSC 411 - 24 (some from Patterson, Sussman, others)

^3

Example^ P1^ P^

Bus^ Directory^ Memory

Processor 1 Processor 2 step State Addr Value State Addr Value Action Proc. Addr Value Addr State {Procs} Value P1: Write 10 to A

Interconnect^ MemoryDirectory

P1: Read A1P2: Read A1P2: Write 20 to A1P2: Write 40 to A2A1 and A2 map to the same cache block^ CMSC 411 - 24 (some from Patterson, Sussman, others)

Example^ P1^ P^

Bus^ Directory^ Memory step^ State Addr Value State Addr Value Action Proc. Addr Value Addr State {Procs} Value P1: Write 10 to A^

Processor 1 Processor 2^ Interconnect^ MemoryDirectory WrMs^ P1^ A1^ A1^ Ex^ {P1}Excl^ A1^10 DaRp^ P1^ A1^0^ Excl.^ A1^10 DaRp^ P1^ A1^0

P1: Read A1P2: Read A1P2 W it^ 20 t^ A1P2: Write 20 to A1P2: Write 40 to A2A1 and A2 map to the same cache block^ CMSC 411 - 24 (some from Patterson, Sussman, others)

^5

Example^ P1^ P^

Bus^ Directory^ Memory step^ State Addr Value State Addr Value Action Proc. Addr Value Addr State {Procs} Value P1: Write 10 to A^

Processor 1 Processor 2^ Interconnect^ MemoryDirectory WrMs^ P1^ A1^ A1^ Ex^ {P1}^ Excl.^ A1^10 DaRp^ P1^ A1^0

P1: Read A1^ Excl.^ A1^10 P2: Read A1P2: Write 20 to A1P2: Write 40 to A2A1 and A2 map to the same cache block^ CMSC 411 - 24 (some from Patterson, Sussman, others)

^6

Example^ P1^ P^

Bus^ Directory^ Memory step^ State Addr Value State Addr Value Action Proc. Addr Value Addr State {Procs} Value P1: Write 10 to A^

Processor 1 Processor 2^ Interconnect^ MemoryDirectory WrMs^ P1^ A1^ A1^ Ex^ {P1}^ Excl.^ A1^10 DaRp^ P1^ A1^0

P1: Read A1^ Excl.^ A1^10 P2: Read A1^ Shar.^ A^

RdMs^ P2^ A1 Shar. A1 10 Ftch^ P1^ A1^10^10 A1A1 Shar. A1 10 DaRp^ P2^ A1^10 A1^ Shar. {P1,P2}^^10

P2: Write 20 to A

p^ {^ }^1010 P2: Write 40 to A^

Write BackWrite Back A1 and A2 map to the same cache block CMSC 411 - 24 (some from Patterson, Sussman, others)^

Example 7

P1^ P2^ Bus^

Directory^ Memory step^ State Addr Value State Addr Value Action Proc. Addr Value Addr State {Procs} Value P1: Write 10 to A^

Processor 1 Processor 2^ Interconnect^ MemoryDirectory WrMs^ P1^ A1^ A1^ Ex^ {P1}^ Excl.^ A1^10 DaRp^ P1^ A1^0

P1: Read A1^ Excl.^ A1^10 P2: Read A1^ Shar.^ A^

RdMs^ P2^ A1 Shar. A1 10 Ftch^ P1^ A1^10^10 A1^ A1 Shar. A1 10 DaRp^ P2^ A1^10 A1^ Shar. {P1,P2}^^10

P2: Write 20 to A

p^ {^ } Excl. A1 20 WrMs^ P2^ A1^10 Inv. Inval.^ P1^ A1^ A1^ Excl.^ {P2}^^10 P2: Write 40 to A^

A1 and A2 map to the same cache block^ CMSC 411 - 24 (some from Patterson, Sussman, others)^

Memory consistency: Expected BehaviorCould this happen on a single-processor machine?(x,y initially 0)PP^1 2 w(x)1^ w(y)

(x,y initially 0)(x,y initially 0)(x,y initially 0)PPPPPP^1 21 21 2 w(x)1^ w(y)1w(x)1 w(y)1w(x)1^ w(y) w(x)1^ w(y)1r(y)1^ r(x)

w(x)1^ w(y)1w(x)1 w(y)1w(x)1^ w(y)1r(y)0^ r(x)1r(y)1 r(x)0r(y)0^ r(x) YES!^ YES!^

YES!^ No! / Assuming accesses atomic, can not come up w/ a single ordering that works.^ Î^ Sequential ConsistencyCMSC 411 - 24 (some from Patterson, Sussman, others)

^13

Processor ConsistencyP^ P^1

P^ P^3

w(x)2^ w(z)4w(y)3^ w(t)^

z x

w(y)3^ w(t)

x zt y^ yt y

CMSC 411 - 24 (some from Patterson, Sussman, others)^

ConsistencyPP^1

PP^3

( )2^ ( )4w(x)2^ w(z)4w(y)3^ w(t)

r(x)2^ r(z)4r(y)3^ r(t)5r(z)0^ r(x)0r(t)0^ r(y)0r(t)0^ r(y)

No.S ti ll i t t?Sequentially consistent?Processor consistent?Yes. CMSC 411 - 24 (some from Patterson, Sussman, others)

^15

Weak ConsistencyDistinguish between synchronization and “regular” accesses.1) all writes complete before sync2) all syncs complete readsWrites

SyncReadsReads CMSC 411 - 24 (some from Patterson, Sussman, others)^16

Release ConsistencyDistinguish between synchronization and “regular” accesses.1) all writes complete before sync2) all syncs complete reads^

Drain theDrain thewrite bufferWriteson snoopy bus.ReleaseRelease Acquireq Reads CMSC 411 - 24 (some from Patterson, Sussman, others)^17

Distributed Shared Memory •^ What is DSM?^ –^ Abstraction of shared memory supported by software.^ N d^1 N d^2

Node^ n

Abstraction of shared memory supported by software.^ Node 1Node 2MemMem

Node^ n^ Mem network distributed shared memory

•^ Why DSM?CMSC 411 - 24 (some from Patterson, Sussman, others)

^18

–^ Easier to program. –^ Shared memory becoming more common.

Networks – A Brief OverviewNetworks^ A Brief Overview

Network Basics^0110

•^ Link made of some physical media^ –^ wire, fiber, air •^ with a^ transmitter^ (tx) on one endwith^ a transmitter (tx) on one end^ –^ converts digital symbols to analog signals and drives them downthe link •^ and a receiver (rx) on the other(^ )^ –^ captures analog signals and converts them back to digital signals •^ tx+rx called a transceiverCMSC 411 - 24 (some from Patterson, Sussman, others)

^20