Consistency Conditions for STM Sandeep Hans Agenda Database

  • Slides: 18
Download presentation
Consistency Conditions for STM Sandeep Hans

Consistency Conditions for STM Sandeep Hans

Agenda • • • Database Consistency Conditions STM Consistency Conditions A different perspective Consistency

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

Database Consistency Conditions • • Recoverability Avoiding Cascading Aborts Strictness Rigorousness

Dirty Reads • T 1 writes x. • T 2 reads x written by

Dirty Reads • T 1 writes x. • T 2 reads x written by T 1. • T 2 commits, T 1 aborts. T 1 T 2 w 1(x) a r 2(x) c 2

Recoverability • T 1 writes x. • T 2 reads x written by T

Recoverability • T 1 writes x. • T 2 reads x written by T 1. • T 1 should commit before T 2 commits. T 1 T 2 w 1(x) c 1 r 2(x) c 2

Problem with Recoverability • Cascading aborts T 1 T 2 w 1(x) ac 1

Problem with Recoverability • Cascading aborts T 1 T 2 w 1(x) ac 1 r 2(x) ac 2

Avoiding Cascading Aborts • T 1 should commit before T 2 commits reads x.

Avoiding Cascading Aborts • T 1 should commit before T 2 commits reads x. T 1 T 2 w 1(x) c 1 r 2(x) c 2

Undo Problem • • Initially, x=1. T 1 writes x=2. T 2 writes x=3

Undo Problem • • Initially, x=1. T 1 writes x=2. T 2 writes x=3 and commits. T 1 aborts. T 1 w 1(x=2) T 2 a 1 w 2(x=3) c 2

Strictness • No data item is read or overwritten unless the transaction that wrote

Strictness • No data item is read or overwritten unless the transaction that wrote it has ended. T 1 T 2 T 3 w 1(x) c 1/a 1 r 2(x) w 3(x)

Rigorousness • No data item is read or overwritten unless the transaction that read/wrote

Rigorousness • No data item is read or overwritten unless the transaction that read/wrote it has ended. T 1 T 2 T 3 w 1(x) c 1/a 1 r 2(x) c 2/a 2 w 3(x)

Landscape RC ACA ST RG [Transactional Information Systems. Gerhard Weikum, Gottfried Vossen. ]

Landscape RC ACA ST RG [Transactional Information Systems. Gerhard Weikum, Gottfried Vossen. ]

STM Conditions • Opacity • Guerraoui and Kapalka [PPo. PP’ 08] • Sequential specification

STM Conditions • Opacity • Guerraoui and Kapalka [PPo. PP’ 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

Database vs. STM • Rigorousness ⊆ ⊆ Opacity ⊂ Strictness • Rigorousness ⊆ VWC ⊂ Strictness Are these inclusions strict?

Another Perspective • How do we view the system? • Operation level. • Database

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 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 +

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, Alessia Milani. Inherent Limitations on Disjoint-Access Parallel Transactional Memory. SPAA 2009.

Conclusion • Motivation for database and STM consistency conditions is same yet perspectives differ.

Conclusion • Motivation for database and STM consistency conditions is same yet perspectives differ. • STM consistency conditions affect other properties.

Thank You

Thank You