180 likes | 302 Vues
Consistency Conditions for STM. Sandeep Hans. Agenda. Database Consistency Conditions STM Consistency Conditions A different perspective Consistency with other STM properties. Conclusion. Database Consistency Conditions. Recoverability Avoiding Cascading Aborts Strictness Rigorousness.
E N D
Consistency Conditions for STM Sandeep Hans
Agenda • Database Consistency Conditions • STM Consistency Conditions • A different perspective • Consistency with other STM properties. • Conclusion
Database Consistency Conditions • Recoverability • Avoiding Cascading Aborts • Strictness • Rigorousness
Dirty Reads • T1 writes x. • T2 reads x written by T1 . • T2 commits, T1 aborts. w1(x) a T1 r2(x) c2 T2
Recoverability • T1 writes x. • T2 reads x written by T1 . • T1 should commit beforeT2 commits. w1(x) c1 T1 r2(x) c2 T2
Problem with Recoverability • Cascading aborts w1(x) c1 a1 T1 r2(x) c2 a2 T2
Avoiding Cascading Aborts • T1 should commit beforeT2 commits reads x. w1(x) c1 T1 r2(x) c2 T2
Undo Problem • Initially, x=1. • T1 writes x=2. • T2 writes x=3 and commits. • T1 aborts. w1(x=2) a1 T1 w2(x=3) c2 T2
Strictness • No data item is read or overwritten unless the transaction that wrote it has ended. w1(x) c1/a1 T1 r2(x) T2 w3(x) T3
Rigorousness • No data item is read or overwritten unless the transaction that read/wrote it has ended. w1(x) c1/a1 T1 r2(x) c2/a2 T2 w3(x) T3
Landscape RC ACA ST RG [Transactional Information Systems. Gerhard Weikum, Gottfried Vossen.]
STM Conditions • Opacity • Guerraoui and Kapalka[PPoPP’08] • Sequential specification of shared objects. • Virtual World Consistency • Imbs and Raynal [SIROCCO’09] • Causal past of a transaction. • Weakest Reasonable Condition • Doherty , Groves, Luchangco, Moir[REFINE’09]
Database vs. STM • Rigorousness ⊆ Opacity ⊂ Strictness • Rigorousness ⊆ VWC ⊂ Strictness ⊆ ⊆ Are these inclusions strict?
Another Perspective • How do we view the system? • Operation level. • Database consistency conditions. • Recoverability, ACA, Strictness, Rigorousness • Transaction level. • STM consistency conditions. • Opacity, VWC • Is there another level?
Snapshot Isolation • Everyone will have a snapshot of the whole system. • A snapshot must be consistent at every point of time. • Different snapshots need not be consistent with each other. • Updating of snapshots is allowed.
How consistency conditions affect STM properties. • DAP + Invisible Reads + Wait-free + Serializability = Impossible. 1 • We have seen the proof on Wednesday. • How do Opacity/VWC affect such results. • DAP + Wait-free + VWC = possible? • DAP + Wait-free + Opacity = impossible? • 1. Hagit Attiya, Eshcar Hillel, AlessiaMilani. Inherent Limitations on Disjoint-Access Parallel Transactional Memory. SPAA 2009.
Conclusion • Motivation for database and STM consistency conditions is same yet perspectives differ. • STM consistency conditions affect other properties.