Language-level Guarantees and Region Serializability
This study delves into the concepts of language-level guarantees for programs with races and and region serializability for all. It explores the potential optimizations and the reduction in possible program behaviors offered by these guarantees. The research delves into the implications of DRF0, SC, RS, and other order guarantees in ensuring the correctness of concurrent programs.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
and region serializability for all JESSICA OUYANG, PETER CHEN, JASON FLINN & SATISH NARAYANASAMY UNIVERSITY OF MICHIGAN
Language-level guarantees for programs with races More potential optimizations Fewer possible program behaviors DRF0 DRF0 SC SC RS RS No Global, serial order of all instructions Global, serial order of regions regions guarantees 2
a = 0 b = 0 lock(B) ... lock(A) lock(A) a = 1 a = a + 1 unlock(A) b = a unlock(A) ... unlock(B) 3 JESSICA OUYANG
a = 0 b = 0 lock(B) ... lock(A) lock(A) a = 1 a = a + 1 unlock(A) b = a unlock(A) ... unlock(B) 4 JESSICA OUYANG
a = 0 b = 0 lock(B) ... lock(A) lock(A) a = 1 a = a + 1 unlock(A) b = a unlock(A) ... unlock(B) 5 JESSICA OUYANG
a = 0 b = 0 lock(B) ... lock(A) lock(A) a = 1 a = a + 1 unlock(A) b = a unlock(A) ... unlock(B) 6 JESSICA OUYANG
a = 0 b = 0 lock(B) ... lock(A) lock(A) a = 1 a = a + 1 unlock(A) b = a unlock(A) ... unlock(B) 7 JESSICA OUYANG
a = 0 b = 0 lock(B) ... lock(A) a = 1 a = a + 1 unlock(A) b = a ... unlock(B) 8 JESSICA OUYANG
a = 0 b = 0 lock(B) ... lock(A) a = 1 a = a + 1 unlock(A) b = a ... unlock(B) 9 JESSICA OUYANG
a = 0 b = 0 lock(B) ... lock(A) a = 1 a = a + 1 unlock(A) b = a ... unlock(B) 10 JESSICA OUYANG
CPU 1 CPU 2 lock(A) lock(B) a = 1 ... unlock(A) a = a + 1 b = a ... unlock(B) time 11 JESSICA OUYANG
CPU 1 CPU 2 lock(A) lock(B) a = 1 ... unlock(A) a = a + 1 b = a ... unlock(B) time 12 JESSICA OUYANG
CPU 1 CPU 2 lock(A) lock(B) a = 1 ... unlock(A) a = a + 1 b = a ... unlock(B) time 13 JESSICA OUYANG
CPU 1 CPU 2 lock(A) lock(B) a = 1 ... unlock(A) a =NaN b =yourPassword ... unlock(B) time 14 JESSICA OUYANG
15 JESSICA OUYANG
16 JESSICA OUYANG
17 JESSICA OUYANG
18 JESSICA OUYANG
a = 0 b = 0 lock(B) ... lock(A) a = 1 a = a + 1 unlock(A) b = a ... unlock(B) 19 JESSICA OUYANG
a = 0 b = 0 lock(B) ... lock(A) a = 1 a = a + 1 unlock(A) b = a ... unlock(B) 20 JESSICA OUYANG
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 21 JESSICA OUYANG
How to provide region serializability Compiler Preserve regions from source code Runtime Run one thread at a time Only preempt at synchronization boundaries 22 JESSICA OUYANG
CPU 1 CPU 2 CPU 3 CPU 4 lock(A) lock(B) lock(A) a = 1 ... a = 1 unlock(A) unlock(A) a = a + 1 lock(B) a:1 b = a ... ... a = a + 1 unlock(B) b = a ... unlock(B) time 23 JESSICA OUYANG
CPU 1 CPU 2 CPU 3 CPU 4 E0 E0 time 24 JESSICA OUYANG
CPU 1 CPU 2 CPU 3 CPU 4 Thread-parallel execution Epoch- parallel execution time 25 JESSICA OUYANG
Uniparallel execution [Veeraraghavan 11] E0 E0 E1 E1 E1 E2 ==? ==? != != E3 E3 1. Checkpoint state E2 E2 2. Start epoch 3. Check state 4. Roll back & Re-execute E3 time E3 E3 26 JESSICA OUYANG
27 JESSICA OUYANG
28 JESSICA OUYANG
Conclusion Strong guarantees for all programs Region serializability One way of providing region serializability Uniparallelism 29 JESSICA OUYANG