Distributed Shared Memory (DSM)
Robert Gasparyan, Angela Gong, Judson Wilson
CS 240, Spring 2015
Distributed Shared Memory (DSM) Robert Gasparyan, Angela Gong, - - PowerPoint PPT Presentation
Distributed Shared Memory (DSM) Robert Gasparyan, Angela Gong, Judson Wilson CS 240, Spring 2015 What is DSM? Physically separate memory addressed as one shared address space Memory shared on page-by-page basis CPU CPU CPU CPU
Robert Gasparyan, Angela Gong, Judson Wilson
CS 240, Spring 2015
What is DSM?
shared address space
Virtual Memory
Network
Memory Memory Memory Memory CPU CPU CPU CPU
Problem
Thread
CPU
Thread
CPU
Thread
CPU
Thread
CPU
Result
? ? ? Thread
DSM: Simple Interface
Shared Memory Thread A
CPU
Thread B
CPU
Consistency Model
Local Memory
R/W
Thread A
CPU CPU
Thread B
R/W
Local Memory Shared Region Shared Region
Release Consistency
execute sequentially
guaranteed to be visible
synchronize until lock is released
Deployment of Binaries
Server
Daemon Daemon Daemon Daemon
A A A A Future capability:
Master: Locks and Page Info
Master
Worker 0 Worker 1 Worker 2 Worker 3
v: 28
Lock Requests
Similar for unlock
Locks
Master
Worker
upon request
Page Servers: Page Contents
Worker Page Server Worker Page Server Worker Page Server Worker Page Server
Implicitly locked memory can be smaller than a
Patches
Acquire Modify
Transparent Interface
Fault handlers, lock/unlock:
access → get latest version
→ mark modified
Transparent Shared Memory
Across Processes Across Network (DSM)
Single Machine Using DSM
Benchmark Setup
versus DSM.
7
6
2 6
1
Matrix Multiplication
3 3 3 1
3 2
4 2 2 1
=
Matrix Multiplication
1/ms
0.001 0.005 0.000 0.0005 0.0003 0.0000Single Machine Using DSM
Number of Cores 0 5 10 15 20 Number of Cores 0 5 10
1/ms
Word Count
Donald Ervin Knuth: The Art of Computer Programming: Generating all Combinations and Partitions
Word Count
0 5 10 15 20 Number of Cores
1/ms
0.0012 0.0062 0.00000 5 10
0.0007 0.0004 0.0000Number of Cores
Single Machine Using DSM
1/ms
Conclusion
○ C data structures ○ Message passing / handling
Bonus: Correctness Test
Private Buckets Worker 0 Worker 1 Worker 2
+1 +2
Shared Buckets Invariant: Sum Shared = Sum Private
Bonus: Correctness Test
Nested Increment Serial Transfer 1 Count Nested Transfer All Counts