07~Chapter_07 - S Locks and C ntion pin onte C panion slide...

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

View Full Document Right Arrow Icon
Spin Locks and Contention Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit
Background image of page 1

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

View Full Document Right Arrow Icon
Art of Multiprocessor Programming 2 Focus so far: Correctness and Progress Models Accurate (we never lied to you) But idealized (so we forgot to mention a few things) Protocols Elegant Important But naïve
Background image of page 2
Art of Multiprocessor Programming 3 New Focus: Performance Models More complicated (not the same as complex!) Still focus on principles (not soon obsolete) Protocols Elegant (in their fashion) Important (why else would we pay attention) And realistic (your mileage may vary)
Background image of page 3

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

View Full Document Right Arrow Icon
Art of Multiprocessor Programming 4 Kinds of Architectures SISD (Uniprocessor) Single instruction stream Single data stream SIMD (Vector) Single instruction Multiple data MIMD (Multiprocessors) Multiple instruction Multiple data.
Background image of page 4
Art of Multiprocessor Programming 5 Kinds of Architectures SISD (Uniprocessor) Single instruction stream Single data stream SIMD (Vector) Single instruction Multiple data MIMD (Multiprocessors) Multiple instruction Multiple data. Our space (1)
Background image of page 5

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

View Full Document Right Arrow Icon
Art of Multiprocessor Programming 6 MIMD Architectures Memory Contention Communication Contention Communication Latency Shared Bus memory Distributed
Background image of page 6
Art of Multiprocessor Programming 7 Today: Revisit Mutual Exclusion Think of performance, not just correctness and progress Begin to understand how performance depends on our software properly utilizing the multiprocessor machine’s hardware And get to know a collection of locking algorithms… (1)
Background image of page 7

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

View Full Document Right Arrow Icon
Art of Multiprocessor Programming 8 What Should you do if you can’t get a lock? Keep trying “spin” or “busy-wait” Good if delays are short Give up the processor Good if delays are long Always good on uniprocessor (1)
Background image of page 8
Art of Multiprocessor Programming 9 What Should you do if you can’t get a lock? Keep trying “spin” or “busy-wait” Good if delays are short Give up the processor Good if delays are long Always good on uniprocessor our focus
Background image of page 9

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

View Full Document Right Arrow Icon
Art of Multiprocessor Programming 10 Basic Spin-Lock CS Resets lock upon exit spin lock critical section . . .
Background image of page 10
Art of Multiprocessor Programming 11 Basic Spin-Lock CS Resets lock upon exit spin lock critical section . . . …lock introduces sequential bottleneck
Background image of page 11

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

View Full Document Right Arrow Icon
Art of Multiprocessor Programming 12 Basic Spin-Lock CS Resets lock upon exit spin lock critical section . . . …lock suffers from contention
Background image of page 12
Art of Multiprocessor Programming 13 Basic Spin-Lock CS Resets lock upon exit spin lock critical section . . . Notice: these are distinct phenomena …lock suffers from contention
Background image of page 13

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

View Full Document Right Arrow Icon
Art of Multiprocessor Programming 14 Basic Spin-Lock CS Resets lock upon exit spin lock critical section .
Background image of page 14
Image of page 15
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 223

07~Chapter_07 - S Locks and C ntion pin onte C panion slide...

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

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