Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading...
-
Upload
amber-evans -
Category
Documents
-
view
217 -
download
0
Transcript of Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading...
![Page 1: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/1.jpg)
Tongping Liu, Charlie Curtsinger, Emery Berger
DTHREADS: Efficient Deterministic Multithreading
Insanity: Doing the same thing over and
over again and expecting different
results.
![Page 2: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/2.jpg)
2
In the Beginning…
![Page 3: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/3.jpg)
3
There was the Core.
![Page 4: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/4.jpg)
4
And it was Good.
![Page 5: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/5.jpg)
5
It gave us our Daily Speed.
![Page 6: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/6.jpg)
6
Until the Apocalypse.
![Page 7: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/7.jpg)
7
And the Speed was no Moore.
![Page 8: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/8.jpg)
8
And then came a False Prophet…
![Page 9: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/9.jpg)
9
![Page 10: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/10.jpg)
10
Want speed?
![Page 11: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/11.jpg)
11
I BRING YOU THE GIFT OF PARALLELISM!
![Page 12: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/12.jpg)
12
color = ; row = 0; // globalsvoid nextStripe(){ for (c = 0; c < Width; c++) drawBox (c,row,color); color = (color == )? : ; row++;}for (n = 0; n < 9; n++) pthread_create(t[n], nextStripe);for (n = 0; n < 9; n++) pthread_join(t[n]);JUST USE THREADS…
![Page 13: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/13.jpg)
13
![Page 14: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/14.jpg)
14
![Page 15: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/15.jpg)
15
![Page 16: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/16.jpg)
16
![Page 17: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/17.jpg)
17
![Page 18: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/18.jpg)
18
pthreads
race conditions
atomicity violations
deadlock
order violations
![Page 19: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/19.jpg)
19
Salvation?
![Page 20: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/20.jpg)
20
![Page 21: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/21.jpg)
21
pthreads
race conditions
atomicity violations
deadlock
order violations
DTHREADS
deterministic
race conditions
atomicity violations
deadlock
order violations
![Page 22: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/22.jpg)
22DTHREADS Enables…
Race-free Executions
Replay Debugging w/o Logging
Replicated State Machines
![Page 23: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/23.jpg)
23
PHOEN
IX
hist
ogra
m
kmea
ns
linea
r_re
gres
sion
mat
rix_m
ultip
lypc
a
reve
rse_
inde
x
strin
g_m
atch
wor
d_co
unt
PARSE
C
blac
ksch
oles
cann
eal
dedu
p
ferret
stre
amclu
ster
swap
tions
hmea
n0
1
2
3
4
5
6
CoreDet dthreads pthreads
run
tim
e r
ela
tive t
o p
thre
ad
s 8.4
Overhead with CoreDet
7.8
DTHREADS: Efficient Determinism
Usually faster than the state of the art
![Page 24: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/24.jpg)
24
PHOEN
IX
hist
ogra
m
kmea
ns
linea
r_re
gres
sion
mat
rix_m
ultip
lypc
a
reve
rse_
inde
x
strin
g_m
atch
wor
d_co
unt
PARSE
C
blac
ksch
oles
cann
eal
dedu
p
ferret
stre
amclu
ster
swap
tions
hmea
n0
1
2
3
4
5
6
CoreDet dthreads pthreads
run
tim
e r
ela
tive t
o p
thre
ad
s 8.4
Overhead with CoreDet
7.8
DTHREADS: Efficient Determinism
Generally as fast or faster than pthreads
![Page 25: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/25.jpg)
25
% g++ myprog.cpp –l thread
DTHREADS: Easy to Use
p
![Page 26: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/26.jpg)
26
Isolation
shared address space disjoint address spaces
![Page 27: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/27.jpg)
27
Performance: Processes vs. Threads
threadsprocesses
1 2 4 8 16 32 64 128 256 512 1024Thread Execution Time (ms)
1.4
1.2
1.0
0.8
0.6
0.4
0.2
0.0
Nor
mal
ized
Exec
ution
Tim
e
![Page 28: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/28.jpg)
28
Performance: Processes vs. Threads
threadsprocesses
1 2 4 8 16 32 64 128 256 512 1024Thread Execution Time (ms)
1.4
1.2
1.0
0.8
0.6
0.4
0.2
0.0
Nor
mal
ized
Exec
ution
Tim
e
![Page 29: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/29.jpg)
29
Performance: Processes vs. Threads
threadsprocesses
1 2 4 8 16 32 64 128 256 512 1024Thread Execution Time (ms)
1.4
1.2
1.0
0.8
0.6
0.4
0.2
0.0
Nor
mal
ized
Exec
ution
Tim
e
![Page 30: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/30.jpg)
30
“Shared Memory”
![Page 31: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/31.jpg)
31
Snapshot pagesbefore modifications
“Shared Memory”
![Page 32: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/32.jpg)
32
Write back diffs
“Shared Memory”
![Page 33: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/33.jpg)
33
“Thread” 1
“Thread” 2
“Thread” 3
Parallel Serial
Update in Deterministic Time & Order
Parallelmutex_lock
cond_wait
pthread_create
![Page 34: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/34.jpg)
34
PHOENIX
histogra
m
kmea
ns
linea
r_reg
ressio
n
matrix_
multiply pca
revers
e_index
string_
match
word_count
PARSEC
blacksc
holes
cannea
l
dedup
ferret
strea
mcluste
r
swap
tions
hmean
0
1
2
3
4
dthreads pthreads
runti
me
rela
tive
to p
thre
ads
DTHREADS performance analysis
![Page 35: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/35.jpg)
35
Thread 1
Main Memory
Core 1
Thread 2
Core 2
Invalidate
The Culprit: False Sharing
![Page 36: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/36.jpg)
36
Thread 1 Thread 2
Invalidate
Main Memory
Core 1 Core 2
The Culprit: False Sharing
20x
![Page 37: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/37.jpg)
37
Process 1 Process 2
Global State
Core 1 Core 2
Process 2
Process 1
DTHREADS: Eliminates False Sharing!
![Page 38: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/38.jpg)
38
PHOEN
IX
hist
ogra
m
kmea
ns
linea
r_re
gres
sion
mat
rix_m
ultip
lypc
a
reve
rse_
inde
x
strin
g_m
atch
wor
d_co
unt
PARSE
C
blac
ksch
oles
cann
eal
dedu
p
ferret
stre
amclu
ster
swap
tions
hmea
n0
1
2
3
4
5
6
ordering only isolation only dthreads
run
tim
e r
ela
tive t
o p
thre
ad
s
Dthreads detailed analysis
DTHREADS: Detailed Analysis
![Page 39: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/39.jpg)
39
PHOEN
IX
hist
ogra
m
kmea
ns
linea
r_re
gres
sion
mat
rix_m
ultip
lypc
a
reve
rse_
inde
x
strin
g_m
atch
wor
d_co
unt
PARSE
C
blac
ksch
oles
cann
eal
dedu
p
ferret
stre
amclu
ster
swap
tions
hmea
n0
1
2
3
4
5
6
ordering only isolation only dthreads
run
tim
e r
ela
tive t
o p
thre
ad
s
Dthreads detailed analysis
DTHREADS: Detailed Analysis
![Page 40: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/40.jpg)
40
PHOEN
IX
hist
ogra
m
kmea
ns
linea
r_re
gres
sion
mat
rix_m
ultip
lypc
a
reve
rse_
inde
x
strin
g_m
atch
wor
d_co
unt
PARSE
C
blac
ksch
oles
cann
eal
dedu
p
ferret
stre
amclu
ster
swap
tions
hmea
n0
1
2
3
4
5
6
ordering only isolation only dthreads
run
tim
e r
ela
tive t
o p
thre
ad
s
Dthreads detailed analysis
DTHREADS: Detailed Analysis
![Page 41: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/41.jpg)
41
PHOEN
IX
hist
ogra
m
kmea
ns
linea
r_re
gres
sion
mat
rix_m
ultip
lypc
a
reve
rse_
inde
x
strin
g_m
atch
wor
d_co
unt
PARSE
C
blac
ksch
oles
dedu
p
ferret
stre
amclu
ster
swap
tions
hmea
n0
1
2
3
4
CoreDet dthreads pthreads
spee
dup
of 8
cor
es o
ver 2
cor
es
Scalability
DTHREADS: Scalable Determinism
![Page 42: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/42.jpg)
42
PHOEN
IX
hist
ogra
m
kmea
ns
linea
r_re
gres
sion
mat
rix_m
ultip
lypc
a
reve
rse_
inde
x
strin
g_m
atch
wor
d_co
unt
PARSE
C
blac
ksch
oles
dedu
p
ferret
stre
amclu
ster
swap
tions
hmea
n0
1
2
3
4
CoreDet dthreads pthreads
spee
dup
of 8
cor
es o
ver 2
cor
es
Scalability
DTHREADS: Scalable Determinism
![Page 43: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/43.jpg)
43
PHOEN
IX
hist
ogra
m
kmea
ns
linea
r_re
gres
sion
mat
rix_m
ultip
lypc
a
reve
rse_
inde
x
strin
g_m
atch
wor
d_co
unt
PARSE
C
blac
ksch
oles
dedu
p
ferret
stre
amclu
ster
swap
tions
hmea
n0
1
2
3
4
CoreDet dthreads pthreads
spee
dup
of 8
cor
es o
ver 2
cor
es
Scalability
DTHREADS: Scalable Determinism
![Page 44: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/44.jpg)
44
DTHREADS
% g++ myprog.cpp –l threadp
![Page 45: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/45.jpg)
45
End
![Page 46: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/46.jpg)
46
A a
![Page 47: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/47.jpg)
47
PHOEN
IX
hist
ogra
m
kmea
ns
linea
r_re
gres
sion
mat
rix_m
ultip
lypc
a
reve
rse_
inde
x
strin
g_m
atch
wor
d_co
unt
PARSE
C
blac
ksch
oles
cann
eal
dedu
p
ferret
stre
amclu
ster
swap
tions
hmea
n
w/o
out
liers
0
1
2
3
4
5
6
dthreads pthreads
run
tim
e r
ela
tive t
o p
thre
ad
s
Excluding Outliers
DTHREADS: Without Outliers
Just 5% slower than pthreads
![Page 48: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/48.jpg)
48
Commit Protocol
Time
Twin Page
Diff
Global State
LocalState
![Page 49: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/49.jpg)
49
a 0
b 0
a 1
b 1
DTHREADS Example Execution
a 0
b 0
a 0
b 0
a 0
b 0
if(a == 0) b = 1;
if(b == 0) a = 1;
Global State
Committed State
a 1
b 1
![Page 50: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/50.jpg)
50
No Problem
a 0
b 0
if(a == 0) b = 1;
if(b == 0) a = 1;
a 1
b 1
![Page 51: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/51.jpg)
51
That’s Better.
a 0
b 0
lock();if(a == 0) b = 1;unlock();
lock();if(b == 0) a = 1;unlock();
b 1
![Page 52: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/52.jpg)
52
a 0
b 0
a 1lock();if(a == 0) b = 1;unlock();
lock();if(b == 0) a = 1;unlock();
Or is it?
![Page 53: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/53.jpg)
53
A aDeterminism
aA
A aIs this enough?
![Page 54: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/54.jpg)
54
bBA a
C
Robust Determinism
![Page 55: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/55.jpg)
55
External Nondeterminism
?
socket = open_socket(80);listen(socket);
![Page 56: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/56.jpg)
56
http://www.gnu.org/s/pth/
![Page 57: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/57.jpg)
57
PHOEN
IX
hist
ogra
m
kmea
ns
linea
r_re
gres
sion
mat
rix_m
ultip
lypc
a
reve
rse_
inde
x
strin
g_m
atch
wor
d_co
unt
PARSE
C
blac
ksch
oles
cann
eal
dedu
p
ferret
stre
amclu
ster
swap
tions
hmea
n0
1
2
3
4
dthreads pthreads
run
tim
e r
ela
tive t
o p
thre
ad
sOverhead
![Page 58: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/58.jpg)
58
Wrap-Up
A a Determinism
Robust Determinism
Internal Determinism?
![Page 59: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/59.jpg)
59
Wrap-Up
Threads to Processes
Commit Before Synch.
Commit In Token Order
![Page 60: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/60.jpg)
60
PHOEN
IX
hist
ogra
m
kmea
ns
linea
r_re
gres
sion
mat
rix_m
ultip
lypc
a
reve
rse_
inde
x
strin
g_m
atch
wor
d_co
unt
PARSE
C
blac
ksch
oles
cann
eal
dedu
p
ferret
stre
amclu
ster
swap
tions
hmea
n0
1
2
3
4
5
6
CoreDet dthreads pthreads
run
tim
e r
ela
tive t
o p
thre
ad
s 8.4
Overhead with CoreDet
7.8
[ASPLOS 10]
Performance: DTHREADS & CoreDet vs. pthreads
![Page 61: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/61.jpg)
61
How DTHREADS Provides Determinism
Isolation
Deterministic Time
Deterministic Order
![Page 62: Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.](https://reader035.fdocuments.net/reader035/viewer/2022062500/5697bfe71a28abf838cb5e31/html5/thumbnails/62.jpg)
62
Evaluation
Phoenixhttp://mapreduce.stanford.edu
http://parsec.cs.princeton.edu