Designing, Modeling, and Optimizing Transactional Data Structures - - PowerPoint PPT Presentation

designing modeling and optimizing transactional data
SMART_READER_LITE
LIVE PREVIEW

Designing, Modeling, and Optimizing Transactional Data Structures - - PowerPoint PPT Presentation

Designing, Modeling, and Optimizing Transactional Data Structures PhD Dissertation Defense Ahmed Hassan Electrical and Computer Engineering Department Virginia Tech September 1, 2015 State of the Art Multi-core architectures.


slide-1
SLIDE 1

Designing, Modeling, and Optimizing Transactional Data Structures

Ahmed Hassan

Electrical and Computer Engineering Department Virginia Tech September 1, 2015

PhD Dissertation Defense

slide-2
SLIDE 2

State of the Art

 Multi-core architectures.  Synchronization

– Critical sections. – Using locks.

 Efficient synchronization:

– Cache coherence protocols. – Atomic instructions (e.g. CAS operations).

From www.microway.com

slide-3
SLIDE 3

Concurrent Data Structures Concurrent Data Structures

slide-4
SLIDE 4

Example: Linked List

10 5 2 70 60 50

slide-5
SLIDE 5

Example: Linked List

10 5 2 70 60 50 55

X

7

X

T1 T2

slide-6
SLIDE 6

Synchronization in Concurrent Data Structures

 Coarse-grained locking

– Easy to implement, good for low number of small threads . – But minimizes concurrency.

 Fine-grained locking

– Allows more concurrency. – But error prone.

 Non-Blocking Designs

– Lock-free, obstruction-free, wait-free, … – Progress guarantees But more complex designs.

slide-7
SLIDE 7

Transactional Memory

 Use an underlying TM framework to guarantee consistency,

atomicity, and isolation.

 Programmable (like coarse-grained locking).  Allows concurrency (like fine-grained locking).

Thread 1

@Atomic foo1() { seqList.add(5) }

slide-8
SLIDE 8

Transactional Memory Gains Traction!!

 Intel Haswell's TSX Extensions.  IBM Power8.  STM support in C++ and GCC.

slide-9
SLIDE 9

What about data structures?

 New APIs  New synchronization

primitives.

 New TM libraries  New compiler

support.

 New hardware

components.

Transactional Programming Model Concurrent Data Structures

 Customized Designs  Optimizations  Different Primitives

slide-10
SLIDE 10

What about data structures?

 New APIs  New synchronization

primitives.

 New TM libraries  New compiler

support.

 New hardware

components.

Transactional Programming Model Concurrent Data Structures

 Customized Designs  Optimizations  Different Primitives

Simpler interface

less complex designs

slide-11
SLIDE 11

What about data structures?

Transactional Programming Model Concurrent Data Structures

 Customized Designs  Optimizations  Different Primitives

Simpler interface

less complex designs

Atomic transaction

instead of atomic operations

 New APIs  New synchronization

primitives.

 New TM libraries  New compiler

support.

 New hardware

components.

slide-12
SLIDE 12

What about data structures?

Transactional Programming Model Concurrent Data Structures

 Customized Designs  Optimizations  Different Primitives

Simpler interface

less complex designs

Atomic transaction

instead of atomic operations

Hardware Support

possible performance improvement

 New APIs  New synchronization

primitives.

 New TM libraries  New compiler

support.

 New hardware

components.

slide-13
SLIDE 13

Our Goal

From Concurrent to Transactional Data Structures

Our Goal

From Concurrent to Transactional Data Structures

slide-14
SLIDE 14

Challenges

 Composability.  Integration with generic transactions.  Modeling.

slide-15
SLIDE 15

Composability

Shared data: concurrentList atomicFoo() { concurrentList.add(x); concurrentList.add(y); } Shared data: concurrentList1 Shared data: concurrentList2 atomicFoo() { concurrentList1.remove(x); concurrentList2.add(x); } Shared data: concurrentList atomicFoo() { concurrentList.add(x); }

slide-16
SLIDE 16

Composability

Shared data: concurrentList atomicFoo() { concurrentList.add(x); concurrentList.add(y); } Shared data: concurrentList1 Shared data: concurrentList2 atomicFoo() { concurrentList1.remove(x); concurrentList2.add(x); } Shared data: concurrentList atomicFoo() { concurrentList.add(x); }

Modify the design of concurrentList? More complex designs

slide-17
SLIDE 17

Composability

Shared data: concurrentList atomicFoo() { concurrentList.add(x); concurrentList.add(y); } Shared data: concurrentList1 Shared data: concurrentList2 atomicFoo() { concurrentList1.remove(x); concurrentList2.add(x); } Shared data: concurrentList atomicFoo() { concurrentList.add(x); }

Modify the design of concurrentList? More complex designs Transactional Memory? Lose optimizations of concurrentList

slide-18
SLIDE 18

Integration

Shared data: concurrentList atomicFoo() { If(concurrentList.add(x)) n1++; Else n2++; }

slide-19
SLIDE 19

Modeling

 Different Designs and Implementations

– Different ad-hoc approaches for proving correctness.

 Is there a unified model for concurrent data

structures? – General enough – Easy to use – Includes composability and integration

slide-20
SLIDE 20

Our Contributions Our Contributions

slide-21
SLIDE 21

Our Contributions

Transactional Data Structures

Composability Integration Modeling

slide-22
SLIDE 22

Our Contributions

Transactional Data Structures

Composability Integration Modeling Optimistic Transactional Boosting PPoPP 2014 OTB-Set OPODIS 2014 TxCF-Tree DISC 2015

slide-23
SLIDE 23

Our Contributions

Transactional Data Structures

Composability Integration Modeling Optimistic Transactional Boosting PPoPP 2014 OTB-Set OPODIS 2014 TxCF-Tree DISC 2015 Integration with STM TRANSACT 2014 Integration with HTM Under submission Remote Transaction Commit IEEE TC 2015 Remote Invalidation IPDPS 2014

slide-24
SLIDE 24

Our Contributions

Transactional Data Structures

Composability Integration Modeling Optimistic Transactional Boosting PPoPP 2014 OTB-Set OPODIS 2014 TxCF-Tree DISC 2015 SWC and C-SWC Models WTTM 2015, under submission Integration with STM TRANSACT 2014 Integration with HTM Under submission Remote Transaction Commit IEEE TC 2015 Remote Invalidation IPDPS 2014

slide-25
SLIDE 25

Our Contributions

Transactional Data Structures

Composability Integration Modeling Optimistic Transactional Boosting PPoPP 2014 OTB-Set OPODIS 2014 TxCF-Tree DISC 2015 SWC and C-SWC Models WTTM 2015, under submission Integration with STM TRANSACT 2014 Integration with HTM Under submission Remote Transaction Commit IEEE TC 2015 Remote Invalidation IPDPS 2014

slide-26
SLIDE 26

Past and Related Work Past and Related Work

slide-27
SLIDE 27

Past and Related Work

 Composability and Integration

– Transactional Memory. – Transactional Boosting.

 Modeling

– SWMR Model

slide-28
SLIDE 28

Past and Related Work

 Composability and Integration

– Transactional Memory. – Transactional Boosting.

 Modeling

– SWMR Model

slide-29
SLIDE 29

Transactional Memory

 Software Transactional Memory (STM)

– SW meta-data (e.g. read-sets and write-sets) on the current HW.

 Hardware Transactional Memory (HTM)

– New HW (modify cache coherency protocols).

 Hybrid Transactional Memory (Hybrid TM)

– HTM transactions fall-back to STM

slide-30
SLIDE 30

TM Limitation: False Conflict

10 5 2 70 60 50 55

X

Example: Linked list (Insert “55”)

slide-31
SLIDE 31

TM Limitation: False Conflict

10 5 2 70 60 50 55

All “red” nodes are in the read-set “50” and “55” are in the write-set Example: Linked list (Insert “55”)

slide-32
SLIDE 32

TM Limitation: False Conflict

10 5 2 70 60 50 55

All “red” nodes are in the read-set “50” and “55” are in the write-set What if a concurrent transaction deletes “5”?? Example: Linked list (Insert “55”)

slide-33
SLIDE 33

TM Limitation: False Conflict

10 5 2 70 60 50 55

All “red” nodes are in the read-set “50” and “55” are in the write-set What if a concurrent transaction deletes “5”??

False Conflict

Example: Linked list (Insert “55”)

slide-34
SLIDE 34

Transactional Boosting

 Convert highly concurrent data structures to be transactional.  Composable (like STM)  And efficient (like lazy/lock-free linked-list)

34

slide-35
SLIDE 35

Transactional Boosting

 Convert highly concurrent data structures to be transactional.  Composable (like STM)  And efficient (like lazy/lock-free linked-list)  Issues:

Eager locking.

Inverse operations.

Black-box concurrent data structure.

No Straightforward Integration

35

slide-36
SLIDE 36

Optimistic Transactional Boosting Optimistic Transactional Boosting

slide-37
SLIDE 37

Past Solutions

Sequential Tree

TM-BEGIN TM-END

Concurrent Tree

Acquire Semantic Locks Release Semantic Locks

Transactional Memory Transactional Boosting

slide-38
SLIDE 38

Past Solutions

TM-BEGIN TM-END Acquire Semantic Locks Release Semantic Locks

Transactional Memory Transactional Boosting

Sequential Tree Concurrent Tree

slide-39
SLIDE 39

Past Solutions

Sequential Tree

TM-BEGIN TM-END

Concurrent Tree

Acquire Semantic Locks Release Semantic Locks

Transactional Memory Transactional Boosting

General, BUT not optimized.

slide-40
SLIDE 40
  • G1: Split operation

Concurrent Operation (add, remove, contains, ...)

OTB's Three Guidelines

slide-41
SLIDE 41
  • G1: Split operation

Traversal (long - unmonitored) Commit (short - monitored) Concurrent Operation (add, remove, contains, ...)

OTB's Three Guidelines

slide-42
SLIDE 42
  • G2: Compose phases.

OTB's Three Guidelines

slide-43
SLIDE 43

Traversal(Op1)

  • G2: Compose phases

Commit(op1) Traversal(Op2) Commit(op2) Atomic Block (Tx)

OTB's Three Guidelines

slide-44
SLIDE 44

Traversal(Op1)

  • G2: Compose phases

Commit(op1) Traversal(Op2) Commit(op2) Atomic Block (Tx) Traversal(Op1)

Commit(op2)

Traversal(Op2)

Commit(op1)

Traversal(Tx) Commit(Tx)

OTB's Three Guidelines

slide-45
SLIDE 45
  • G3: Optimize

OTB's Three Guidelines

slide-46
SLIDE 46
  • G3: Optimize

Specific to each data structure.

  • Our Contribution:

Linked-list-based Set.

Skip-list-based Set.

Skip-list-based Priority Queue.

Balanced Tree

OTB's Three Guidelines

slide-47
SLIDE 47
  • G3: Optimize

Specific to each data structure.

  • Our Contribution:

Linked-list-based Set.

Skip-list-based Set.

Skip-list-based Priority Queue.

Balanced Tree

OTB's Three Guidelines

slide-48
SLIDE 48

Lazy Vs Boosting Vs Optimistic Boosting

48

slide-49
SLIDE 49

Example Bootsing “lazy” concurrent linked list Example Bootsing “lazy” concurrent linked list

slide-50
SLIDE 50

Concurrent Non-optimized Transactional G1 & G2 Optimized Transactional G3

OTB Methodology

50

General Data Structure Specific

slide-51
SLIDE 51

Example

 Lazy Linked list (Insert “55”)

10 5 2 70 60 50

51

slide-52
SLIDE 52

Example

 Lazy Linked list (Insert “55”)  Traversal (unmonitored)

10 5 2 70 60 50

52

slide-53
SLIDE 53

Example

 Lazy Linked list (Insert “55”)  Traversal (unmonitored)  Validation

10 5 2 70 60 50

53

slide-54
SLIDE 54

Example

 Lazy Linked list (Insert “55”)  Traversal (unmonitored)  Validation  Commit

10 5 2 70 60 50

54

55

X

slide-55
SLIDE 55

To Make it Transactional

 Results of traversal are saved in local objects:

Semantic read-set: to be validated.

Semantic write-set: to be published at commit.

slide-56
SLIDE 56

To Make it Transactional

Example: Linked list (Insert “55”)

10 5 2 70 60 50

slide-57
SLIDE 57

To Make it Transactional

Example: Linked list (Insert “55”)

10 5 2 70 60 50

read-set entry

  • Pred:50, curr:60

write-set entry

  • Pred:50, curr:60, new:55
slide-58
SLIDE 58

To Make it Transactional

Example: Linked list (Insert “55”)

Guidelines to guarantee opacity (see OPODIS'14 paper)

10 5 2 70 60 50

read-set entry

  • Pred:50, curr:60

write-set entry

  • Pred:50, curr:60, new:55
slide-59
SLIDE 59

 Example optimizations on Linked-List and Skip-List

Local elimination:

  • Ex. Add(x) then Remove(x).
  • No need to access the shared data structure.

Specific Optimizations

slide-60
SLIDE 60

Results Skip-list 512 Nodes 5 ops/transaction Skip-list 64K Nodes 5 ops/transaction

60

slide-61
SLIDE 61

Transactional Interference-less Balanced Tree Transactional Interference-less Balanced Tree

slide-62
SLIDE 62

Transactional Interference-less Balanced Trees

  • Transactional: Functionality (following OTB's G1, G2).
  • Interference-less: Performance (following OTB's G3).
slide-63
SLIDE 63

The Next Question

  • Which concurrent balanced tree design fits OTB?
slide-64
SLIDE 64

The Next Question

  • Which concurrent balanced tree design fits OTB?

Contention-Friendly Tree

Crain, Gramoli, & Raynal'13

slide-65
SLIDE 65

CF-Tree

10 20 10 20 30 20 30 10

  • Example: Insert 30.
slide-66
SLIDE 66

CF-Tree

10 20 10 20 30 20 30 10

{10, 20} {10, 20, 30} {10, 20, 30}

  • Example: Insert 30.
slide-67
SLIDE 67

CF-Tree

10 20 10 20 30 20 30 10

{10, 20} {10, 20, 30} {10, 20, 30}

Semantic Structural

  • Example: Insert 30.
slide-68
SLIDE 68

CF-Tree

10 20 10 20 30 20 30 10

{10, 20} {10, 20, 30} {10, 20, 30}

Semantic Structural

  • Example: Insert 30.

Application Thread Helper Thread

slide-69
SLIDE 69

Our Proposal

Transactionalizing CF-Tree using OTB (TxCF-Tree)

slide-70
SLIDE 70

TxCF-Tree

10 20 10 20 30 20 30 10 Application Thread Helper Thread

slide-71
SLIDE 71

TxCF-Tree

10 20 10 20 30 20 30 10 Application Thread Helper Thread

slide-72
SLIDE 72

TxCF-Tree

10 20 Application Thread

slide-73
SLIDE 73

TxCF-Tree

10 20 Application Thread unmonitored traversal

slide-74
SLIDE 74

TxCF-Tree

10 20 Application Thread unmonitored traversal Lock & Validate

slide-75
SLIDE 75

TxCF-Tree

10 20 30 Application Thread unmonitored traversal Lock & Validate Insert

slide-76
SLIDE 76

TxCF-Tree

10 20 30 Application Thread unmonitored traversal Lock & Validate Insert Commit Traversal

slide-77
SLIDE 77

Remove is similar...

20 10 30 10 20(d) 30 10 30

{10, 20, 30} {10, 20} {10, 20}

Semantic Structural Application Thread Helper Thread

slide-78
SLIDE 78

Remove is similar...

20 10 30 10 20(d) 30 10 30

{10, 20, 30} {10, 20} {10, 20}

Semantic Structural Application Thread Helper Thread

slide-79
SLIDE 79

Remove is similar...

10 20(d) 30 Application Thread unmonitored traversal Lock & Validate Mark as “d” Commit Traversal

slide-80
SLIDE 80

Transactional Interference-less Tree

slide-81
SLIDE 81

Transactional Interference-less Tree

  • How

Step 1: CF-Tree!!

Step 2: Always give the highest priority to semantic operations over structural operations.

slide-82
SLIDE 82

Transactional Interference-less Tree

  • How

Step 1: CF-Tree!!

Step 2: Always give the highest priority to semantic operations over structural operations.

  • Why

Aborting transactions rolls back all its operations (including the non-conflicting ones).

Long transactions are more prone to interfere with the helper thread.

slide-83
SLIDE 83

Two building blocks

  • Structural Locks.
  • Structural Invalidation.
slide-84
SLIDE 84

Structural Locks

slide-85
SLIDE 85

Structural Locks

10 20 30

  • Transaction T1 wants to delete 30.
  • after traversal and before commit, assume 2 scenarios

A concurrent rotation

10 20 30

A concurrent delete(30)

slide-86
SLIDE 86

Structural Locks

10 20 30

  • Transaction T1 wants to delete 30.
  • after traversal and before commit, assume 2 scenarios

A concurrent rotation

10 20 30

A concurrent delete(30)

slide-87
SLIDE 87

Structural Locks

10 20 30

  • Transaction T1 wants to delete 30.
  • after traversal and before commit, assume 2 scenarios

A concurrent rotation

10 20 30

A concurrent delete(30) T1 observes that “30” is locked What is the best to do in both cases?

slide-88
SLIDE 88

Structural Locks

10 20 30

  • Transaction T1 wants to delete 30.
  • after traversal and before commit, assume 2 scenarios

A concurrent rotation

10 20 30

A concurrent delete(30) T1 observes that “30” is locked What is the best to do in both cases?

Do Nothing Abort

slide-89
SLIDE 89

Structural Locks

10 20 30

  • Transaction T1 wants to delete 30.
  • after traversal and before commit, assume 2 scenarios

A concurrent rotation

10 20 30

A concurrent delete(30) Solution?

slide-90
SLIDE 90

Structural Locks

10 20 30

  • Transaction T1 wants to delete 30.
  • after traversal and before commit, assume 2 scenarios

A concurrent rotation

10 20 30

A concurrent delete(30)

Structural Locks Semantic Lock

Solution? Two types of locks

slide-91
SLIDE 91

Structural Invalidation

slide-92
SLIDE 92

Structural Invalidation

10 20 30

  • Transaction T1 wants to insert 15.
  • after traversal and before commit, assume 2 scenarios

A concurrent rotation

10 20 30

A concurrent insert(15)

slide-93
SLIDE 93

Structural Invalidation

  • Transaction T1 wants to insert 15.
  • after traversal and before commit, assume 2 scenarios

A concurrent rotation

10

A concurrent insert(15)

20 30 15 20 30 10

slide-94
SLIDE 94

Structural Invalidation

  • Transaction T1 wants to insert 15.
  • after traversal and before commit, assume 2 scenarios

A concurrent rotation

10

A concurrent insert(15)

20 30 15 20 30 10

T1 observes that the right child of “20” is not NULL What is the best to do in both cases?

slide-95
SLIDE 95

Structural Invalidation

  • Transaction T1 wants to insert 15.
  • after traversal and before commit, assume 2 scenarios

A concurrent rotation

10

A concurrent insert(15)

20 30 15 20 30 10

T1 observes that the right child of “20” is not NULL What is the best to do in both cases?

Continue Traversal Abort

slide-96
SLIDE 96

Structural Invalidation

  • Transaction T1 wants to insert 15.
  • after traversal and before commit, assume 2 scenarios

A concurrent rotation

10

A concurrent insert(15)

20 30 15 20 30 10

Solution?

slide-97
SLIDE 97

Structural Invalidation

  • Transaction T1 wants to insert 15.
  • after traversal and before commit, assume 2 scenarios

A concurrent rotation

10

A concurrent insert(15)

20 30 15 20 30 10

Solution? Continue Traversal anyway

slide-98
SLIDE 98

Evaluation

AMD 64-cores, size 10K nodes, 50% reads, 5 ops/transaction

slide-99
SLIDE 99

Evaluation

AMD 64-cores, size: 10K nodes , 32 threads, 50% reads, 5 ops/transaction

slide-100
SLIDE 100

Modeling Transactional Data Structures Modeling Transactional Data Structures

slide-101
SLIDE 101

Concurrent Data Structures

  • Different Designs and Implementations

Different ad-hoc approaches for proving correctness.

  • Is there a unified model for concurrent data structures?

General enough.

Easy to use.

slide-102
SLIDE 102

SWMR Model (Lev-Ari et. Al, DISC'14)

UO1 UO2 UOn UO3 RO1 RO2

slide-103
SLIDE 103

Shared States

  • Data Structure is represented as a set of shared variables.
  • The values of those variables is the shared state of the data

structure. Operation“O”

Pre-state(O) Post-state(O)

slide-104
SLIDE 104

Local States

  • Operation is represented as a set of steps.
  • The values of the operation's local variables before any step is

the local state of the step.

Pre-state(O) Post-state(O)

Step1 Step2 Stepn L1 L2 Ln Operation “O”

slide-105
SLIDE 105

SWMR Scenario

UO1 UO2 UOn UO3 Step1 Step2 Stepn L1 L2 Ln RO

S0 S1 S2 S3 Sn

slide-106
SLIDE 106

Validity

slide-107
SLIDE 107

Validity

UO1 UO2 UOn UO3 Step1 Step2 Stepn L1 L2 Ln RO

S0 S1 S2 S3 Sn

slide-108
SLIDE 108

Validity

  • All Si are sequentially reachable, so all UOi are valid.

UO1 UO2 UOn UO3 Step1 Step2 Stepn L1 L2 Ln RO

S0 S1 S2 S3 Sn

slide-109
SLIDE 109

Validity

  • All Si are sequentially reachable, so all UOi are valid.
  • Stepi in RO is valid if there is Sj such that a sequential

execution of RO starting from Sj reaches Li. UO1 UO2 UOn UO3 Step1 Step2 Stepn L1 L2 Ln RO

S0 S1 S2 S3 Sn

slide-110
SLIDE 110

Validity

  • All Si are sequentially reachable, so all UOi are valid.
  • Stepj in RO is valid if there is Si such that a sequential

execution of RO starting from Si reaches Lj. UO1 UO2 UOn UO3 Step1 Step2 Stepn L1 L2 Ln RO

S0 S1 S2 S3 Sn

slide-111
SLIDE 111
  • All Si are sequentially reachable, so all UOi are valid.
  • Stepj in RO is valid if there is Si such that a sequential execution of RO

starting from Si reaches Lj.

  • Stepj in RO is valid if there is a “base point” where the “base condition”
  • f stepj holds.

Validity

UO1 UO2 UOn UO3 Step1 Step2 Stepn L1 L2 Ln RO

S0 S1 S2 S3 Sn

slide-112
SLIDE 112

Validity

  • How to prove validity for any data structure.

Identify the base conditions for each step in each operation (it is sufficient to do so only for steps that access the shared memory).

Prove that in any concurrent execution, every step has a base point that satisfies its base condition.

slide-113
SLIDE 113

Validity

  • How to prove validity for any data structure.

Identify the base conditions for each step in each operation (it is sufficient to do so only for steps that access the shared memory).

Prove that in any concurrent execution, every step has a base point that satisfies its base condition.

slide-114
SLIDE 114

Regularity

UO1 UO2 UOn UO3 RO1 RO2

slide-115
SLIDE 115

Regularity

UO1 UO2 UOn UO3 RO1 RO2 UO1 UO2 UOn UO3 RO1 UO1 UO2 UOn UO3 RO2

slide-116
SLIDE 116

Regularity

UO1 UO2 UOn UO3 RO1 RO2 UO1 UO2 UOn UO3 RO1 UO1 UO2 UOn UO3 RO2

Linearizable Linearizable

slide-117
SLIDE 117

Regularity

UO1 UO2 UOn UO3 Step1 Step2 Stepn RO

S0 S1 S2 S3 Sn

slide-118
SLIDE 118

Regularity

  • Acceptable base points for RO's return step are only S1, S2, S3.

– Observes either the last update or a concurrent update.

UO1 UO2 UOn UO3 Step1 Step2 Stepn Ln RO

S0 S1 S2 S3 Sn

slide-119
SLIDE 119

Example

slide-120
SLIDE 120

Example

slide-121
SLIDE 121

Example

slide-122
SLIDE 122

Where is the Problem? It covers only single-writer designs It does not cover composable designs Can we cover a wider set? Optimistic Composable Data Structures

slide-123
SLIDE 123

Our Models Single Writer Commit (SWC) Composable SWC (C-SWC)

slide-124
SLIDE 124

SWC Model

UO1 Step1 Step2 Stepn RO UO2 UO3 UO5 UO4

slide-125
SLIDE 125

SWC Model

Step1 Step2 Stepn RO T4 C4 T1 C1 T2 C2 T3 C3 T5 C5

slide-126
SLIDE 126

SWC Model

T4 C4 T1 C1 T2 C2 T3 C3 T5 C5

S0 S1 S2 S3 S5 S4

Step1 Step2 Stepn RO

slide-127
SLIDE 127

SWC Model

T4 C4 T1 C1 T2 C2 T3 C3 T5 C5

S0 S1 S2 S3 S5 S4

Step1 Step2 Stepn L1 L2 Ln RO

L1 L2 Ln L1 L2 Ln L1 L2 Ln L1 L2 Ln L1 L2 Ln

slide-128
SLIDE 128

Even More...

  • Do we really need single commit at a time:

NO!!!

It is enough to execute commit phases atomically with single lock atomicity (SLA) guarantees.

More practical alternatives:

  • HTM (e.g. Intel TSX).
  • STM (e.g. NOrec “the SLA version”).
slide-129
SLIDE 129

Example

slide-130
SLIDE 130

Example

slide-131
SLIDE 131

Example

slide-132
SLIDE 132

Composable SWC Model (C-SWC)

slide-133
SLIDE 133

Composable SWC Model (C-SWC)

Traversal(Op1) Commit(op1) Traversal(Op2) Commit(op2) Atomic Block (Tx) Traversal(Op1)

Commit(op2)

Traversal(Op2)

Commit(op1)

Traversal(Tx) Commit(Tx)

slide-134
SLIDE 134

What is remaining?

  • Internal Consistency.

The commit phase of each operation reflects what the operation

  • bserved in its traversal.

The shared state of an operation is visible to subsequent operations in the same transaction.

slide-135
SLIDE 135

How to prove internal consistency?

Traversal(Op1)

Commit(op2)

Traversal(Op2)

Commit(op1)

slide-136
SLIDE 136

How to prove internal consistency?

Traversal(Op1)

Commit(op2)

Traversal(Op2)

Commit(op1)

L L L

Have the same base point

slide-137
SLIDE 137

Conclusions Conclusions

slide-138
SLIDE 138

Our Contributions

Transactional Data Structures

Composability Integration Modeling Optimistic Transactional Boosting PPoPP 2014 OTB-Set OPODIS 2014 TxCF-Tree DISC 2015 SWC and C-SWC Models WTTM 2015, under submission Integration with STM TRANSACT 2014 Integration with HTM Under submission Remote Transaction Commit IEEE TC 2015 Remote Invalidation IPDPS 2014

slide-139
SLIDE 139

Thanks!

Questions?

139