Introduction
Moore’s Law
Moore’s Law (in practice)
Nearly Extinct: the Uniprocesor
Endangered: The Shared Memory Multiprocessor(SMP)
The New Boss: The Multicore Processor(CMP)
From the 2008 press…
Traditional Scaling Process
Ideal Scaling Process
Actual Scaling Process
Multicore Programming:Course Overview
Sequential Computation
Concurrent Computation
Asynchrony
Model Summary
Road Map
Concurrency Jargon
Parallel Primality Testing
Load Balancing
Procedure for Thread i
Issues
Issues
Shared Counter
Procedure for Thread i
Procedure for Thread i
Where Things Reside
Procedure for Thread i
Procedure for Thread i
Counter Implementation
Counter Implementation
What It Means
What It Means
Not so good…
Is this problem inherent?
Challenge
Challenge
Hardware Solution
An Aside: Java™
An Aside: Java™
An Aside: Java™
Mutual Exclusion,or “Alice & Bob share a pond”
Alice has a pet
Bob has a pet
The Problem
Formalizing the Problem
Formalizing our Problem
Simple Protocol
Interpretation
Cell Phone Protocol
Interpretation
Can Protocol
Bob conveys a bit
Bob conveys a bit
Can Protocol
Interpretation
Flag Protocol
Alice’s Protocol (sort of)
Bob’s Protocol (sort of)
Alice’s Protocol
Bob’s Protocol
Bob’s Protocol (2nd try)
Bob’s Protocol
The Flag Principle
Proof of Mutual Exclusion
Proof
Proof of No Deadlock
Proof of No Deadlock
Proof of No Deadlock
Remarks
Moral of Story
The Arbiter Problem (an aside)
The Fable Continues
The Fable Continues
The Fable Continues
Bob Puts Food in the Pond
Alice releases her pets to Feed
Producer/Consumer
Producer/Consumer
Surprise Solution
Bob puts food in Pond
Bob knocks over Can
Alice Releases Pets
Alice Resets Can when Pets are Fed
Pseudocode
Pseudocode
Correctness
Correctness
Correctness
Could Also Solve Using Flags
Waiting
The Fable drags on …
The Fable drags on …
The Fable drags on …
Billboards are Large
Write One Letter at a Time …
To post a message
Let’s send another message
Uh-Oh
Readers/Writers
Readers/Writers (continued)
Esoteric?
Readers/Writers Solution
Why do we care?
Amdahl’s Law
Amdahl’s Law
Amdahl’s Law
Amdahl’s Law
Amdahl’s Law
Amdahl’s Law (in practice)
Example
Example
Example
Example
Example
Example
Example
Example
Back to Real-World Multicore Scaling
Shared Data Structures
Shared Data Structures
Shared Data Structures