michael bond milind kulkarni minjia zhang meisam fathi...
TRANSCRIPT
![Page 1: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/1.jpg)
Michael Bond Milind Kulkarni Man Cao Minjia Zhang Meisam Fathi Salmi Swarnendu Biswas Aritra Sengupta Jipeng Huang
Ohio State
Purdue
![Page 2: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/2.jpg)
Parallel programming is mainstream
Shared memory with locks
Challenge: performance & correctness
![Page 3: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/3.jpg)
• Help express parallelism better • Eliminate concurrency errors • Diagnose production bugs • Deal with nondeterminism
Need practical runtime support
![Page 4: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/4.jpg)
• Atomicity checking • Data race detection • Record & replay
• Transactional memory • DRF/SC enforcement • Deterministic execution
Need practical runtime support
![Page 5: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/5.jpg)
• Atomicity checking • Data race detection • Record & replay
• Transactional memory • DRF/SC enforcement • Deterministic execution
Track dependences Control dependences
Need practical runtime support
o.f = …
… = o.f
![Page 6: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/6.jpg)
• Atomicity checking • Data race detection • Record & replay
• Transactional memory • DRF/SC enforcement • Deterministic execution
Track dependences Control dependences
Need practical runtime support
o.f = …
… = o.f
![Page 7: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/7.jpg)
• Atomicity checking • Data race detection • Record & replay
• Transactional memory • DRF/SC enforcement • Deterministic execution
Track dependences Control dependences
Need practical runtime support
o.f = …
… = o.f
Commodity (software-only) approaches slow programs by several times
![Page 8: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/8.jpg)
• Atomicity checking • Data race detection • Record & replay
• Transactional memory • DRF/SC enforcement • Deterministic execution
Track dependences Control dependences
o.f = …
check
… = o.f
check
Need practical runtime support
Commodity (software-only) approaches slow programs by several times
![Page 9: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/9.jpg)
• Atomicity checking • Data race detection • Record & replay
• Transactional memory • DRF/SC enforcement • Deterministic execution
Track dependences Control dependences
o.f = …
check
… = o.f
check
Need practical runtime support
Any access could race add synchronization at every access
![Page 10: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/10.jpg)
Octet
Framework for runtime support HB edges all dependences Atomicity of analysis & access Concurrency control mechanism Synchronization cross-thread dependence Qualitative performance improvement
![Page 11: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/11.jpg)
Octet
Framework for runtime support HB edges all dependences Atomicity of analysis & access Concurrency control mechanism Synchronization cross-thread dependence Qualitative performance improvement
Proofs!
![Page 12: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/12.jpg)
Octet tracks ownership
Each object’s state Є { WrExT , RdExT , RdShc }
![Page 13: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/13.jpg)
wr o.f
T1 T2
write check
o’s state = WrExT1 T
ime
![Page 14: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/14.jpg)
wr o.f
T1 T2
read check
write check
o’s state = WrExT1 T
ime
![Page 15: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/15.jpg)
wr o.f
T1 T2
read check
write check
o’s state = WrExT1 T
ime
![Page 16: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/16.jpg)
wr o.f
T1 T2
safe point
write check
read check
o’s state = WrExT1 T
ime
![Page 17: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/17.jpg)
wr o.f
T1 T2
safe point
write check
read check
o’s state = WrExT1
Implicit safe point T
ime
![Page 18: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/18.jpg)
wr o.f
T1 T2
safe point
write check
read check
o’s state = WrExT1 T
ime
![Page 19: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/19.jpg)
wr o.f
T1 T2
safe point
write check
read check
o’s state = RdExT2 T
ime
![Page 20: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/20.jpg)
wr o.f
T1 T2
rd o.f
safe point
write check
read check
o’s state = RdExT2 T
ime
![Page 21: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/21.jpg)
wr o.f
T1 T2
rd o.f
safe point
read check
write check
o’s state = RdExT2
T3 T4
![Page 22: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/22.jpg)
wr o.f
T1 T2
rd o.f
T3
safe point
T4
read check
write check
read check
o’s state = RdExT2
![Page 23: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/23.jpg)
wr o.f
T1 T2
rd o.f
rd o.f
T3
safe point
T4
read check
write check
read check
o’s state = RdShc
![Page 24: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/24.jpg)
wr o.f
T1 T2
rd o.f
rd o.f
T3
safe point
T4
read check
write check
read check
read check
o’s state = RdShc
![Page 25: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/25.jpg)
wr o.f
T1 T2
rd o.f
rd o.f
T3
safe point
rd o.f
T4
read check
write check
read check
read check
o’s state = RdShc
![Page 26: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/26.jpg)
wr o.f
T1 T2
rd o.f
rd o.f
T3
safe point
rd o.f
T4
read check
write check
read check
read check
o’s state = RdShc
Sharing detection [von Praun & Gross ’01] Comparison in our paper Distributed shared memory Shasta [Scales et al. ’96] Biased locking [Kawachiya et al. ’02] [Russell & Detlefs ’06] [Hindman & Grossman ’06]
![Page 27: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/27.jpg)
• Atomicity checking • Data race detection • Record & replay
• Transactional memory • DRF/SC enforcement • Deterministic execution
Practical runtime support
Track dependences Control dependences
Framework for runtime support Concurrency control mechanism
![Page 28: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/28.jpg)
wr o.f
T1 T2
rd o.f
rd o.f
T3
safe point
rd o.f
T4
read check
write check
read check
read check
Dependence recorder records happens-before edges
![Page 29: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/29.jpg)
Implementation in Jikes RVM Publicly available http://jikesrvm.org/Research+Archive
Parallel programs DaCapo Benchmarks 2006 & 2009
SPEC JBB 2000 & 2005
Parallel platform 32 cores (AMD Opteron 6272)
![Page 30: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/30.jpg)
0
100
200
300
400
500
600
700
800
900
1000
Ove
rhe
ad
(%
)
Pessimistic
34,600% 3,000%
![Page 31: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/31.jpg)
0
20
40
60
80
100
120O
verh
ea
d (
%)
Octet w/o coord
Octet w/o coord
![Page 32: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/32.jpg)
0
20
40
60
80
100
120O
verh
ea
d (
%)
Octet
Octet w/o coord
![Page 33: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/33.jpg)
0
20
40
60
80
100
120O
verh
ea
d (
%)
Recorder
Octet
Octet w/o coord
![Page 34: Michael Bond Milind Kulkarni Minjia Zhang Meisam Fathi ...web.cse.ohio-state.edu/~bond.213/octet-oopsla-2013-talk.pdf · T1 T4T2 T3 rd o.f rd o.f safe point rd o.f read check write](https://reader034.vdocuments.mx/reader034/viewer/2022050123/5f535f619a319d453668f86a/html5/thumbnails/34.jpg)
Octet helps enable practical runtime support for reliable, scalable concurrency Framework for runtime support HB edges all dependences Atomicity of analysis & access Concurrency control mechanism Synchronization cross-thread dependence Qualitative performance improvement