Download presentation
Presentation is loading. Please wait.
Published byConrad McGee Modified over 9 years ago
1
…and region serializability for all JESSICA OUYANG, PETER CHEN, JASON FLINN & SATISH NARAYANASAMY UNIVERSITY OF MICHIGAN
2
Language-level guarantees for programs with races 2 Fewer possible program behaviors More potential optimizations No guarantee s DRF0 Global, serial order of all instructions SC Global, serial order of regions RS
3
JESSICA OUYANG 3 a = 0 b = 0 lock(A) a = 1 unlock(A) lock(B)... lock(A) a = a + 1 b = a unlock(A)... unlock(B)
4
JESSICA OUYANG 4 a = 0 b = 0 lock(A) a = 1 unlock(A) lock(B)... lock(A) a = a + 1 b = a unlock(A)... unlock(B)
5
JESSICA OUYANG 5 a = 0 b = 0 lock(A) a = 1 unlock(A) lock(B)... lock(A) a = a + 1 b = a unlock(A)... unlock(B)
6
JESSICA OUYANG 6 a = 0 b = 0 lock(A) a = 1 unlock(A) lock(B)... lock(A) a = a + 1 b = a unlock(A)... unlock(B)
7
JESSICA OUYANG 7 a = 0 b = 0 lock(A) a = 1 unlock(A) lock(B)... lock(A) a = a + 1 b = a unlock(A)... unlock(B)
8
JESSICA OUYANG 8 a = 0 b = 0 lock(A) a = 1 unlock(A) lock(B)... a = a + 1 b = a... unlock(B)
9
JESSICA OUYANG 9 a = 0 b = 0 lock(A) a = 1 unlock(A) lock(B)... a = a + 1 b = a... unlock(B)
10
JESSICA OUYANG 10 a = 0 b = 0 lock(A) a = 1 unlock(A) lock(B)... a = a + 1 b = a... unlock(B)
11
JESSICA OUYANG 11 CPU 1CPU 2 time lock(A) a = 1 unlock(A) lock(B)... a = a + 1 b = a... unlock(B)
12
JESSICA OUYANG 12 CPU 1CPU 2 time lock(A) a = 1 unlock(A) lock(B)... a = a + 1 b = a... unlock(B)
13
JESSICA OUYANG 13 CPU 1CPU 2 time lock(A) a = 1 unlock(A) lock(B)... a = a + 1 b = a... unlock(B)
14
JESSICA OUYANG 14 CPU 1CPU 2 time lock(A) a = 1 unlock(A) lock(B)... a =NaN b =yourPassword... unlock(B)
15
JESSICA OUYANG 15
16
JESSICA OUYANG 16 DRF0
17
JESSICA OUYANG 17 DRF0
18
JESSICA OUYANG 18 DRF0
19
JESSICA OUYANG 19 a = 0 b = 0 lock(A) a = 1 unlock(A) lock(B)... a = a + 1 b = a... unlock(B)
20
JESSICA OUYANG 20 a = 0 b = 0 lock(A) a = 1 unlock(A) lock(B)... a = a + 1 b = a... unlock(B)
21
Region serializability for all programs Guarantees ◦ Atomic synchronization-free regions ◦ Global, serial order of all regions Benefits ◦ Easy for programmers & tools to reason about ◦ Compilers can reorder freely within regions JESSICA OUYANG 21
22
How to provide region serializability Compiler ◦ Preserve regions from source code Runtime ◦ Run one thread at a time ◦ Only preempt at synchronization boundaries JESSICA OUYANG 22
23
JESSICA OUYANG 23 time lock(A) a = 1 unlock(A) lock(B)... a = a + 1 b = a... unlock(B) CPU 3CPU 2CPU 4CPU 1 a:1 lock(A) a = 1 unlock(A) lock(B)... a = a + 1 b = a... unlock(B)
24
JESSICA OUYANG 24 time CPU 3CPU 2CPU 4CPU 1 E0
25
JESSICA OUYANG 25 time CPU 3CPU 2CPU 4CPU 1 Epoch- parallel execution Thread-parallel execution
26
E1 E3 E2 E0 == ? 2. Start epoch 1. Checkpoint state E1 E0 E2 E3 != 3. Check state 4. Roll back & Re-execute time JESSICA OUYANG 26 Uniparallel execution [Veeraraghavan ’11]
27
JESSICA OUYANG 27
28
JESSICA OUYANG 28
29
Conclusion Strong guarantees for all programs ◦ Region serializability One way of providing region serializability ◦ Uniparallelism JESSICA OUYANG 29
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.