76
An Innovative Approach to Achieve Compositionality Efficiently using Multi-Version Object Based Transactional Systems Chirag Juyal 1 Sandeep Kulkarni 2 Sweta Kumari 1 Sathya Peri 1 Archit Somani 1 1 CSE Dept, IIT Hyderabad 2 CSE Dept, Michigan State University 20th International Symposium on Stabilization, Safety, and Security of Distributed Systems (SSS 2018) IIT Hyderbad, INDIA MV-OSTMs 1 / 43

An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

An Innovative Approach to Achieve CompositionalityEfficiently using Multi-Version Object Based

Transactional Systems

Chirag Juyal1 Sandeep Kulkarni2 Sweta Kumari1 Sathya Peri1

Archit Somani1

1CSE Dept, IIT Hyderabad 2CSE Dept, Michigan State University20th International Symposium on Stabilization, Safety, and

Security of Distributed Systems (SSS 2018)

IIT Hyderbad, INDIA MV-OSTMs 1 / 43

Page 2: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Outline

1 Introduction to STMs

2 Problem with read-write STMs

3 Object Based STMs

4 Motivation towards MV-OSTM

5 Experimental Evaluation

6 Conclusion

7 Future Work

IIT Hyderbad, INDIA MV-OSTMs 2 / 43

Page 3: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Outline

1 Introduction to STMs

2 Problem with read-write STMs

3 Object Based STMs

4 Motivation towards MV-OSTM

5 Experimental Evaluation

6 Conclusion

7 Future Work

IIT Hyderbad, INDIA MV-OSTMs 3 / 43

Page 4: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Software Transaction Memory Systems (STMs)Introduction

Transaction

Sequence of instructions guaranteed to execute atomically.

History

Concurrent execution of transactions.

w2(x , 10) w2(y , 10)

r1(x , 0)

T2

T1

C2

r1(z , 0)C1

Figure: History of an STM

IIT Hyderbad, INDIA MV-OSTMs 4 / 43

Page 5: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Software Transaction Memory Systems (STMs)Introduction

Transaction

Sequence of instructions guaranteed to execute atomically.

History

Concurrent execution of transactions.

w2(x , 10) w2(y , 10)

r1(x , 0)

T2

T1

C2

r1(z , 0)C1

Figure: History of an STM

IIT Hyderbad, INDIA MV-OSTMs 4 / 43

Page 6: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

STMs Cont’d..Introduction

Software Transaction Memory Systems(STMs) are a convenientprogramming interface for a programmer to access shared memoryusing concurrent threads without worrying about concurrency issues.

Traditionally, STMs export the following methods:

t begin()t read()t write()tryC() and tryA()

We refer to these as Read-Write STMs(or RWSTM).

IIT Hyderbad, INDIA MV-OSTMs 5 / 43

Page 7: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

STMs Cont’d..Introduction

Software Transaction Memory Systems(STMs) are a convenientprogramming interface for a programmer to access shared memoryusing concurrent threads without worrying about concurrency issues.

Traditionally, STMs export the following methods:

t begin()t read()t write()tryC() and tryA()

We refer to these as Read-Write STMs(or RWSTM).

IIT Hyderbad, INDIA MV-OSTMs 5 / 43

Page 8: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

A thread safe concurrent linked-list(LL) using STM

Algorithm 1 Insert(LL, e): Invoked by a thread to insert an element e intoa linked-list LL. This method is implemented using transactions.

1: retry = 0;2: while (true) do3: id = t begin(retry);4: ...5: ...6: v = t read(id , x); . reads the value of x as v7: ...8: ...9: t write(id , x , v ′); . writes a value v ′ to x10: ...11: ...12: ret = tryC(id); . tryC can return commit or abort13: if (ret == commit) then14: break;15: else16: retry++;17: end if18: end while

IIT Hyderbad, INDIA MV-OSTMs 6 / 43

Page 9: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Working of STMs methods

T2T1

T1’s Local Log T2’s Local Log

Memory

T2T1

T1’s Local Log T2’s Local Log

Memory

Read fromMemory

T2T1

T1’s Local Log T2’s Local Log

Memory

Read fromMemory

T2T1

T2’s Local Log

Memory

T1’s Local Log

Write to local Log

T2T1

T2’s Local Log

Memory

T1’s Local Log

Write to local Log

T2T1

Write to local Log

T2’s Local Log

Memory

T1’s Local Log

T2T1

Memory

T1’s Local Log T2’s Local Log

T2

Validate T1’s Log

T1

Memory

T2’s Local Log

T2T1

T1’s Log Permanent

Memory

T2’s Local Log

T1 Committed

T1

T1’s Log Permanent T2’s Log Validated

T2

Memory

T1 Committed

T1

T1’s Log Permanent

T2

Memory

T1 Committed T2 Aborted

Figure: Working of STM System

IIT Hyderbad, INDIA MV-OSTMs 7 / 43

Page 10: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Working of STMs methods

T2T1

T1’s Local Log T2’s Local Log

Memory

T2T1

T1’s Local Log T2’s Local Log

Memory

Read fromMemory

T2T1

T1’s Local Log T2’s Local Log

Memory

Read fromMemory

T2T1

T2’s Local Log

Memory

T1’s Local Log

Write to local Log

T2T1

T2’s Local Log

Memory

T1’s Local Log

Write to local Log

T2T1

Write to local Log

T2’s Local Log

Memory

T1’s Local Log

T2T1

Memory

T1’s Local Log T2’s Local Log

T2

Validate T1’s Log

T1

Memory

T2’s Local Log

T2T1

T1’s Log Permanent

Memory

T2’s Local Log

T1 Committed

T1

T1’s Log Permanent T2’s Log Validated

T2

Memory

T1 Committed

T1

T1’s Log Permanent

T2

Memory

T1 Committed T2 Aborted

Figure: Working of STM System

IIT Hyderbad, INDIA MV-OSTMs 7 / 43

Page 11: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Working of STMs methods

T2T1

T1’s Local Log T2’s Local Log

Memory

T2T1

T1’s Local Log T2’s Local Log

Memory

Read fromMemory

T2T1

T1’s Local Log T2’s Local Log

Memory

Read fromMemory

T2T1

T2’s Local Log

Memory

T1’s Local Log

Write to local Log

T2T1

T2’s Local Log

Memory

T1’s Local Log

Write to local Log

T2T1

Write to local Log

T2’s Local Log

Memory

T1’s Local Log

T2T1

Memory

T1’s Local Log T2’s Local Log

T2

Validate T1’s Log

T1

Memory

T2’s Local Log

T2T1

T1’s Log Permanent

Memory

T2’s Local Log

T1 Committed

T1

T1’s Log Permanent T2’s Log Validated

T2

Memory

T1 Committed

T1

T1’s Log Permanent

T2

Memory

T1 Committed T2 Aborted

Figure: Working of STM System

IIT Hyderbad, INDIA MV-OSTMs 7 / 43

Page 12: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Working of STMs methods

T2T1

T1’s Local Log T2’s Local Log

Memory

T2T1

T1’s Local Log T2’s Local Log

Memory

Read fromMemory

T2T1

T1’s Local Log T2’s Local Log

Memory

Read fromMemory

T2T1

T2’s Local Log

Memory

T1’s Local Log

Write to local Log

T2T1

T2’s Local Log

Memory

T1’s Local Log

Write to local Log

T2T1

Write to local Log

T2’s Local Log

Memory

T1’s Local Log

T2T1

Memory

T1’s Local Log T2’s Local Log

T2

Validate T1’s Log

T1

Memory

T2’s Local Log

T2T1

T1’s Log Permanent

Memory

T2’s Local Log

T1 Committed

T1

T1’s Log Permanent T2’s Log Validated

T2

Memory

T1 Committed

T1

T1’s Log Permanent

T2

Memory

T1 Committed T2 Aborted

Figure: Working of STM System

IIT Hyderbad, INDIA MV-OSTMs 7 / 43

Page 13: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Working of STMs methods

T2T1

T1’s Local Log T2’s Local Log

Memory

T2T1

T1’s Local Log T2’s Local Log

Memory

Read fromMemory

T2T1

T1’s Local Log T2’s Local Log

Memory

Read fromMemory

T2T1

T2’s Local Log

Memory

T1’s Local Log

Write to local Log

T2T1

T2’s Local Log

Memory

T1’s Local Log

Write to local Log

T2T1

Write to local Log

T2’s Local Log

Memory

T1’s Local Log

T2T1

Memory

T1’s Local Log T2’s Local Log

T2

Validate T1’s Log

T1

Memory

T2’s Local Log

T2T1

T1’s Log Permanent

Memory

T2’s Local Log

T1 Committed

T1

T1’s Log Permanent T2’s Log Validated

T2

Memory

T1 Committed

T1

T1’s Log Permanent

T2

Memory

T1 Committed T2 Aborted

Figure: Working of STM System

IIT Hyderbad, INDIA MV-OSTMs 7 / 43

Page 14: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Working of STMs methods

T2T1

T1’s Local Log T2’s Local Log

Memory

T2T1

T1’s Local Log T2’s Local Log

Memory

Read fromMemory

T2T1

T1’s Local Log T2’s Local Log

Memory

Read fromMemory

T2T1

T2’s Local Log

Memory

T1’s Local Log

Write to local Log

T2T1

T2’s Local Log

Memory

T1’s Local Log

Write to local Log

T2T1

Write to local Log

T2’s Local Log

Memory

T1’s Local Log

T2T1

Memory

T1’s Local Log T2’s Local Log

T2

Validate T1’s Log

T1

Memory

T2’s Local Log

T2T1

T1’s Log Permanent

Memory

T2’s Local Log

T1 Committed

T1

T1’s Log Permanent T2’s Log Validated

T2

Memory

T1 Committed

T1

T1’s Log Permanent

T2

Memory

T1 Committed T2 Aborted

Figure: Working of STM System

IIT Hyderbad, INDIA MV-OSTMs 7 / 43

Page 15: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Working of STMs methods

T2T1

T1’s Local Log T2’s Local Log

Memory

T2T1

T1’s Local Log T2’s Local Log

Memory

Read fromMemory

T2T1

T1’s Local Log T2’s Local Log

Memory

Read fromMemory

T2T1

T2’s Local Log

Memory

T1’s Local Log

Write to local Log

T2T1

T2’s Local Log

Memory

T1’s Local Log

Write to local Log

T2T1

Write to local Log

T2’s Local Log

Memory

T1’s Local Log

T2T1

Memory

T1’s Local Log T2’s Local Log

T2

Validate T1’s Log

T1

Memory

T2’s Local Log

T2T1

T1’s Log Permanent

Memory

T2’s Local Log

T1 Committed

T1

T1’s Log Permanent T2’s Log Validated

T2

Memory

T1 Committed

T1

T1’s Log Permanent

T2

Memory

T1 Committed T2 Aborted

Figure: Working of STM System

IIT Hyderbad, INDIA MV-OSTMs 7 / 43

Page 16: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Working of STMs methods

T2T1

T1’s Local Log T2’s Local Log

Memory

T2T1

T1’s Local Log T2’s Local Log

Memory

Read fromMemory

T2T1

T1’s Local Log T2’s Local Log

Memory

Read fromMemory

T2T1

T2’s Local Log

Memory

T1’s Local Log

Write to local Log

T2T1

T2’s Local Log

Memory

T1’s Local Log

Write to local Log

T2T1

Write to local Log

T2’s Local Log

Memory

T1’s Local Log

T2T1

Memory

T1’s Local Log T2’s Local Log

T2

Validate T1’s Log

T1

Memory

T2’s Local Log

T2T1

T1’s Log Permanent

Memory

T2’s Local Log

T1 Committed

T1

T1’s Log Permanent T2’s Log Validated

T2

Memory

T1 Committed

T1

T1’s Log Permanent

T2

Memory

T1 Committed T2 Aborted

Figure: Working of STM System

IIT Hyderbad, INDIA MV-OSTMs 7 / 43

Page 17: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Working of STMs methods

T2T1

T1’s Local Log T2’s Local Log

Memory

T2T1

T1’s Local Log T2’s Local Log

Memory

Read fromMemory

T2T1

T1’s Local Log T2’s Local Log

Memory

Read fromMemory

T2T1

T2’s Local Log

Memory

T1’s Local Log

Write to local Log

T2T1

T2’s Local Log

Memory

T1’s Local Log

Write to local Log

T2T1

Write to local Log

T2’s Local Log

Memory

T1’s Local Log

T2T1

Memory

T1’s Local Log T2’s Local Log

T2

Validate T1’s Log

T1

Memory

T2’s Local Log

T2T1

T1’s Log Permanent

Memory

T2’s Local Log

T1 Committed

T1

T1’s Log Permanent T2’s Log Validated

T2

Memory

T1 Committed

T1

T1’s Log Permanent

T2

Memory

T1 Committed T2 Aborted

Figure: Working of STM System

IIT Hyderbad, INDIA MV-OSTMs 7 / 43

Page 18: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Working of STMs methods

T2T1

T1’s Local Log T2’s Local Log

Memory

T2T1

T1’s Local Log T2’s Local Log

Memory

Read fromMemory

T2T1

T1’s Local Log T2’s Local Log

Memory

Read fromMemory

T2T1

T2’s Local Log

Memory

T1’s Local Log

Write to local Log

T2T1

T2’s Local Log

Memory

T1’s Local Log

Write to local Log

T2T1

Write to local Log

T2’s Local Log

Memory

T1’s Local Log

T2T1

Memory

T1’s Local Log T2’s Local Log

T2

Validate T1’s Log

T1

Memory

T2’s Local Log

T2T1

T1’s Log Permanent

Memory

T2’s Local Log

T1 Committed

T1

T1’s Log Permanent T2’s Log Validated

T2

Memory

T1 Committed

T1

T1’s Log Permanent

T2

Memory

T1 Committed T2 Aborted

Figure: Working of STM System

IIT Hyderbad, INDIA MV-OSTMs 7 / 43

Page 19: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Working of STMs methods

T2T1

T1’s Local Log T2’s Local Log

Memory

T2T1

T1’s Local Log T2’s Local Log

Memory

Read fromMemory

T2T1

T1’s Local Log T2’s Local Log

Memory

Read fromMemory

T2T1

T2’s Local Log

Memory

T1’s Local Log

Write to local Log

T2T1

T2’s Local Log

Memory

T1’s Local Log

Write to local Log

T2T1

Write to local Log

T2’s Local Log

Memory

T1’s Local Log

T2T1

Memory

T1’s Local Log T2’s Local Log

T2

Validate T1’s Log

T1

Memory

T2’s Local Log

T2T1

T1’s Log Permanent

Memory

T2’s Local Log

T1 Committed

T1

T1’s Log Permanent T2’s Log Validated

T2

Memory

T1 Committed

T1

T1’s Log Permanent

T2

Memory

T1 Committed T2 Aborted

Figure: Working of STM System

IIT Hyderbad, INDIA MV-OSTMs 7 / 43

Page 20: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Working of STMs methods

T2T1

T1’s Local Log T2’s Local Log

Memory

T2T1

T1’s Local Log T2’s Local Log

Memory

Read fromMemory

T2T1

T1’s Local Log T2’s Local Log

Memory

Read fromMemory

T2T1

T2’s Local Log

Memory

T1’s Local Log

Write to local Log

T2T1

T2’s Local Log

Memory

T1’s Local Log

Write to local Log

T2T1

Write to local Log

T2’s Local Log

Memory

T1’s Local Log

T2T1

Memory

T1’s Local Log T2’s Local Log

T2

Validate T1’s Log

T1

Memory

T2’s Local Log

T2T1

T1’s Log Permanent

Memory

T2’s Local Log

T1 Committed

T1

T1’s Log Permanent T2’s Log Validated

T2

Memory

T1 Committed

T1

T1’s Log Permanent

T2

Memory

T1 Committed T2 Aborted

Figure: Working of STM System

IIT Hyderbad, INDIA MV-OSTMs 7 / 43

Page 21: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Correctness of STM System: Opacity a

Opacity

1 It is a popular correctness-criteria for STMs which is stronger thanserializability.

2 Opacity like serializability requires that the concurrent executionincluding the aborted transactions be equivalent to some serialexecution.

aGuerraoui, R., Kapalka, M.: On the Correctness of Transactional Memory. PPoPP, 2008

IIT Hyderbad, INDIA MV-OSTMs 8 / 43

Page 22: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Correctness of STM System: Opacity a

Opacity

1 It is a popular correctness-criteria for STMs which is stronger thanserializability.

2 Opacity like serializability requires that the concurrent executionincluding the aborted transactions be equivalent to some serialexecution.

aGuerraoui, R., Kapalka, M.: On the Correctness of Transactional Memory. PPoPP, 2008

IIT Hyderbad, INDIA MV-OSTMs 8 / 43

Page 23: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Correctness of STM System Cont’d..

Example of opacity

H: r1(x,0)w2(x,10)w2(y,10)C2r1(y,A)A1

w2(x , 10) w2(y , 10)

A1r1(y , 10)r1(x , 0)

C2

T1

T2

Figure: History H is not Opaque but Serializable

w2(x , 10) w2(y , 10)

A1r1(y ,A)r1(x , 0)

T2

T1

C2

Figure: Opaque History H

IIT Hyderbad, INDIA MV-OSTMs 9 / 43

Page 24: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Correctness of STM System Cont’d..

Example of opacity

H: r1(x,0)w2(x,10)w2(y,10)C2r1(y,A)A1

w2(x , 10) w2(y , 10)

A1r1(y , 10)r1(x , 0)

C2

T1

T2

Figure: History H is not Opaque but Serializable

w2(x , 10) w2(y , 10)

A1r1(y ,A)r1(x , 0)

T2

T1

C2

Figure: Opaque History HIIT Hyderbad, INDIA MV-OSTMs 9 / 43

Page 25: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Correctness of STM System Cont’d..

Example of opacity

H: r1(x,0)w2(x,10)w2(y,10)C2r1(y,A)A1

w2(x , 10) w2(y , 10)

A1r1(y ,A)r1(x , 0)

T2

T1

C2

Figure: Opaque History H

A1r1(y ,A)r1(x , 0)T1

w2(x , 10) w2(y , 10)C2

T2

Figure: Equivalent serial history S: T1, T2

IIT Hyderbad, INDIA MV-OSTMs 10 / 43

Page 26: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Correctness of STM System Cont’d..

Example of opacity

H: r1(x,0)w2(x,10)w2(y,10)C2r1(y,A)A1

w2(x , 10) w2(y , 10)

A1r1(y ,A)r1(x , 0)

T2

T1

C2

Figure: Opaque History H

A1r1(y ,A)r1(x , 0)T1

w2(x , 10) w2(y , 10)C2

T2

Figure: Equivalent serial history S: T1, T2

IIT Hyderbad, INDIA MV-OSTMs 10 / 43

Page 27: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Outline

1 Introduction to STMs

2 Problem with read-write STMs

3 Object Based STMs

4 Motivation towards MV-OSTM

5 Experimental Evaluation

6 Conclusion

7 Future Work

IIT Hyderbad, INDIA MV-OSTMs 11 / 43

Page 28: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Problem with read-write STMs

k2 k5 k7 k8 k9

Figure: A sample concurrent list

T1: lookup(k5), lookup(k8) & T2: delete(k7)

r1(k5) w2(k5) r1(k5)w2(k7)

T2

r2(k2) r2(k5) r1(k8)r1(k2)

T1

r1(k2) r2(k7)

Figure: Tree Structure : conflicts are (r1(k5), w2(k5)) and (w2(k5), r1(k5))

IIT Hyderbad, INDIA MV-OSTMs 12 / 43

Page 29: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Problem with read-write STMs

k2 k5 k7 k8 k9

Figure: A sample concurrent list

T1: lookup(k5), lookup(k8) & T2: delete(k7)

r1(k5) w2(k5) r1(k5)w2(k7)

T2

r2(k2) r2(k5) r1(k8)r1(k2)

T1

r1(k2) r2(k7)

Figure: Tree Structure : conflicts are (r1(k5), w2(k5)) and (w2(k5), r1(k5))

IIT Hyderbad, INDIA MV-OSTMs 12 / 43

Page 30: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Problem with read-write STMs

k2 k5 k7 k8 k9

Figure: A sample concurrent list

T1: lookup(k5), lookup(k8) & T2: delete(k7)

r1(k5) w2(k5) r1(k5)w2(k7)

T2

r2(k2) r2(k5) r1(k8)r1(k2)

T1

r1(k2) r2(k7)

Figure: Tree Structure : conflicts are (r1(k5), w2(k5)) and (w2(k5), r1(k5))

IIT Hyderbad, INDIA MV-OSTMs 12 / 43

Page 31: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Problem at read-write level

r1(k5) w2(k5) r1(k5)w2(k7)

T2

r2(k2) r2(k5) r2(k7)r1(k2) r1(k8)r1(k2)

T1

Figure: Tree Structure

Schedule cannot be accepted by a RWSTM.

T2T1

Figure: Cycle (Not Serial)

IIT Hyderbad, INDIA MV-OSTMs 13 / 43

Page 32: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Problem at read-write level

r1(k5) w2(k5) r1(k5)w2(k7)

T2

r2(k2) r2(k5) r2(k7)r1(k2) r1(k8)r1(k2)

T1

Figure: Tree Structure

Schedule cannot be accepted by a RWSTM.

T2T1

Figure: Cycle (Not Serial)IIT Hyderbad, INDIA MV-OSTMs 13 / 43

Page 33: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Outline

1 Introduction to STMs

2 Problem with read-write STMs

3 Object Based STMs

4 Motivation towards MV-OSTM

5 Experimental Evaluation

6 Conclusion

7 Future Work

IIT Hyderbad, INDIA MV-OSTMs 14 / 43

Page 34: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

OSTM b c

Introduction

Object-based STMs (OSTM) operate on higher level objects ratherthan primitive read & writes which act upon memory locations.

OSTM for sets may export t begin(), t insert(), t delete(), t lookup()and tryC().

OSTM for stacks may export t begin(), t push(), t pop(), t peek()and tryC().

bHerlihy, M., Koskinen, E., Transactional boosting: a methodology for highly-concurrent transactional objects. PPoPP’08

cHassan, Ahmed and Palmieri, Roberto and Ravindran, Binoy, Optimistic Transactional Boosting, PPoPP’14

IIT Hyderbad, INDIA MV-OSTMs 15 / 43

Page 35: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

OSTM b c

Introduction

Object-based STMs (OSTM) operate on higher level objects ratherthan primitive read & writes which act upon memory locations.

OSTM for sets may export t begin(), t insert(), t delete(), t lookup()and tryC().

OSTM for stacks may export t begin(), t push(), t pop(), t peek()and tryC().

bHerlihy, M., Koskinen, E., Transactional boosting: a methodology for highly-concurrent transactional objects. PPoPP’08

cHassan, Ahmed and Palmieri, Roberto and Ravindran, Binoy, Optimistic Transactional Boosting, PPoPP’14

IIT Hyderbad, INDIA MV-OSTMs 15 / 43

Page 36: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

OSTM b c

Introduction

Object-based STMs (OSTM) operate on higher level objects ratherthan primitive read & writes which act upon memory locations.

OSTM for sets may export t begin(), t insert(), t delete(), t lookup()and tryC().

OSTM for stacks may export t begin(), t push(), t pop(), t peek()and tryC().

bHerlihy, M., Koskinen, E., Transactional boosting: a methodology for highly-concurrent transactional objects. PPoPP’08

cHassan, Ahmed and Palmieri, Roberto and Ravindran, Binoy, Optimistic Transactional Boosting, PPoPP’14

IIT Hyderbad, INDIA MV-OSTMs 15 / 43

Page 37: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

OSTMExecution at layer-1

k2 k5 k7 k8 k9

Figure: A sample concurrent list

T1: lookup(k5), lookup(k8) & T2: delete(k7)

Layer-1: Lookups & Deletes

Layer-0: Reads

r2(k2) r2(k5) r2(k7) w2(k7) r1(k2)

d2(k7)

T2

c2

r1(k5) r1(k5)w2(k5)

l1(k5) l1(k8)

r1(k2) r1(k8)

T1

& Writes

Figure: Tree Structure : no conflict at Layer-1 d

dGerhard Weikum and Gottfried Vossen. 2001. Transactional Information Systems Book

IIT Hyderbad, INDIA MV-OSTMs 16 / 43

Page 38: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

OSTMExecution at layer-1

k2 k5 k7 k8 k9

Figure: A sample concurrent list

T1: lookup(k5), lookup(k8) & T2: delete(k7)

Layer-1: Lookups & Deletes

Layer-0: Reads

r2(k2) r2(k5) r2(k7) w2(k7) r1(k2)

d2(k7)

T2

c2

r1(k5) r1(k5)w2(k5)

l1(k5) l1(k8)

r1(k2) r1(k8)

T1

& Writes

Figure: Tree Structure : no conflict at Layer-1 d

dGerhard Weikum and Gottfried Vossen. 2001. Transactional Information Systems Book

IIT Hyderbad, INDIA MV-OSTMs 16 / 43

Page 39: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

OSTMExecution at layer-1

k2 k5 k7 k8 k9

Figure: A sample concurrent list

T1: lookup(k5), lookup(k8) & T2: delete(k7)

Layer-1: Lookups & Deletes

Layer-0: Reads

r2(k2) r2(k5) r2(k7) w2(k7) r1(k2)

d2(k7)

T2

c2

r1(k5) r1(k5)w2(k5)

l1(k5) l1(k8)

r1(k2) r1(k8)

T1

& Writes

Figure: Tree Structure : no conflict at Layer-1 d

dGerhard Weikum and Gottfried Vossen. 2001. Transactional Information Systems Book

IIT Hyderbad, INDIA MV-OSTMs 16 / 43

Page 40: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

OSTMExecution at layer-1

d2(k7)

T2

l1(k5) l1(k8)

T1

Figure: Pruned Tree

l1(k8) d2(k7)

T2

l1(k5)

T1

Figure: Sequential Schedule

T2T1

Figure: Serial History

IIT Hyderbad, INDIA MV-OSTMs 17 / 43

Page 41: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

OSTMExecution at layer-1

d2(k7)

T2

l1(k5) l1(k8)

T1

Figure: Pruned Tree

l1(k8) d2(k7)

T2

l1(k5)

T1

Figure: Sequential Schedule

T2T1

Figure: Serial History

IIT Hyderbad, INDIA MV-OSTMs 17 / 43

Page 42: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

OSTMExecution at layer-1

d2(k7)

T2

l1(k5) l1(k8)

T1

Figure: Pruned Tree

l1(k8) d2(k7)

T2

l1(k5)

T1

Figure: Sequential Schedule

T2T1

Figure: Serial HistoryIIT Hyderbad, INDIA MV-OSTMs 17 / 43

Page 43: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Inefficiency with OSTM

T1

T2

A1

C2

Lu1(ht, k2, nil)

Ins2(ht, k2, v2)

Lu1(ht, k1,Abort)

Ins2(ht, k1, v2)

Figure: Single version OSTM

IIT Hyderbad, INDIA MV-OSTMs 18 / 43

Page 44: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Outline

1 Introduction to STMs

2 Problem with read-write STMs

3 Object Based STMs

4 Motivation towards MV-OSTM

5 Experimental Evaluation

6 Conclusion

7 Future Work

IIT Hyderbad, INDIA MV-OSTMs 19 / 43

Page 45: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Motivation towards MV-OSTMAdvantages of multi-versione over single version RWSTM

T1

T2

A1

C2

r1(k2, 0)

w2(k2, 10) w2(k1, 20)

r1(k1,Abort)

Figure: Single version RWSTM

T1

T2

C2

r1(k2, 0)

w2(k2, 10) w2(k1, 20)

C1r1(k1, 0)

Figure: Multi-version RWSTM (MV-RWSTM) : (T1, T2)

eKumar P., Peri S., and K. Vidyasankar. A TimeStamp Based Multi-version STM Algorithm. ICDCN, 2014

IIT Hyderbad, INDIA MV-OSTMs 20 / 43

Page 46: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Motivation towards MV-OSTMAdvantages of multi-versione over single version RWSTM

T1

T2

A1

C2

r1(k2, 0)

w2(k2, 10) w2(k1, 20)

r1(k1,Abort)

Figure: Single version RWSTM

T1

T2

C2

r1(k2, 0)

w2(k2, 10) w2(k1, 20)

C1r1(k1, 0)

Figure: Multi-version RWSTM (MV-RWSTM) : (T1, T2)

eKumar P., Peri S., and K. Vidyasankar. A TimeStamp Based Multi-version STM Algorithm. ICDCN, 2014

IIT Hyderbad, INDIA MV-OSTMs 20 / 43

Page 47: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Proposed Algorithm : MV-OSTMAdvantages of multi-version over single version OSTM

T1

T2

A1

C2

Lu1(ht, k2, nil)

Ins2(ht, k2, v2)

Lu1(ht, k1,Abort)

Ins2(ht, k1, v2)

Figure: Single version OSTM

T1

T2

C2

C1Lu1(ht, k2, nil)

Ins2(ht, k2, v2)

Lu1(ht, k1, nil)

Ins2(ht, k1, v2)

Figure: Multi-version OSTM (MV-OSTM) : (T1, T2)

IIT Hyderbad, INDIA MV-OSTMs 21 / 43

Page 48: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Proposed Algorithm : MV-OSTMAdvantages of multi-version over single version OSTM

T1

T2

A1

C2

Lu1(ht, k2, nil)

Ins2(ht, k2, v2)

Lu1(ht, k1,Abort)

Ins2(ht, k1, v2)

Figure: Single version OSTM

T1

T2

C2

C1Lu1(ht, k2, nil)

Ins2(ht, k2, v2)

Lu1(ht, k1, nil)

Ins2(ht, k1, v2)

Figure: Multi-version OSTM (MV-OSTM) : (T1, T2)

IIT Hyderbad, INDIA MV-OSTMs 21 / 43

Page 49: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Proposed Algorithm : MV-OSTMHigh-level data structure

A transaction Ti is assigned a unique timestamp i , when invoked.

Timestamps are monotonically increasing.

Ti can issue t lookup(), t insert(), t delete() and tryC() methods.

k1

1

2

3

4

m

k3 k6

+∞−∞ k8k7

Figure: MV-OSTM designf

fSathya Peri, Ajay Singh, and Archit Somani, Efficient means of Achieving Composability using Object based Conflicts on

Transactional Memory, NETYS’18

IIT Hyderbad, INDIA MV-OSTMs 22 / 43

Page 50: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Proposed Algorithm : MV-OSTMHigh-level data structure

A transaction Ti is assigned a unique timestamp i , when invoked.

Timestamps are monotonically increasing.

Ti can issue t lookup(), t insert(), t delete() and tryC() methods.

k1

1

2

3

4

m

k3 k6

+∞−∞ k8k7

Figure: MV-OSTM designf

fSathya Peri, Ajay Singh, and Archit Somani, Efficient means of Achieving Composability using Object based Conflicts on

Transactional Memory, NETYS’18

IIT Hyderbad, INDIA MV-OSTMs 22 / 43

Page 51: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Proposed Algorithm : MV-OSTMHigh-level data structure cont’d..

RVL(Return Value List)

VL(Version List)k1

0 v0 rvl1T

201675 2827 30

15 v5 F rvl2 25 v10 F

12 18 23

rvl3

35

ts val rvlMark

Figure: Data Structure for maintaining versions

IIT Hyderbad, INDIA MV-OSTMs 23 / 43

Page 52: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Proposed Algorithm : MV-OSTMt lookup() method

t lookup() rule: Ti on invoking Lui (k1) lookups the value v insertedby a transaction Tj that commits before Lui (k1) and j is the largesttimestamp ≤ i .

VL(Version List)

RVL(Return Value List)

k1

0 v0 rvl1T

201675 2827 30

15 v5 F rvl2 25 v10 F

12 18 23 35

rvl3

13

Figure: Lookup on key k1 by T13

IIT Hyderbad, INDIA MV-OSTMs 24 / 43

Page 53: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Proposed Algorithm : MV-OSTMt lookup() method

t lookup() rule: Ti on invoking Lui (k1) lookups the value v insertedby a transaction Tj that commits before Lui (k1) and j is the largesttimestamp ≤ i .

VL(Version List)

RVL(Return Value List)

k1

0 v0 rvl1T

201675 2827 30

15 v5 F rvl2 25 v10 F

12 18 23 35

rvl3

13

Figure: Lookup on key k1 by T13

IIT Hyderbad, INDIA MV-OSTMs 24 / 43

Page 54: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Proposed Algorithm : MV-OSTMt lookup() method cont’d..

VL(Version List)

RVL(Return Value List)

k1

0 v0 rvl1T

201675 2827 30

15 v5 F rvl2 25 v10 F

12 18 23 35

rvl3

13

Figure: T13 searching appropriate place in version list of k1

IIT Hyderbad, INDIA MV-OSTMs 25 / 43

Page 55: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Proposed Algorithm : MV-OSTMt lookup() method cont’d..

VL(Version List)

RVL(Return Value List)

k1

0 v0 rvl1T

201675 2827 30

15 v5 F rvl2 25 v10 F

12 18 23 35

rvl3

13

Figure: T13 successfully added into rvl1

IIT Hyderbad, INDIA MV-OSTMs 26 / 43

Page 56: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Proposed Algorithm : MV-OSTMt insert(), t delete(), and tryC() methods

t insert() and t delete() rule: Ti inserts and delete into localmemory. The actual effect of both the methods will come in tryC().

tryC() rule: Ti on invoking tryC() operation checks for each key k ,in its Insert set and Delete set:

1 If a transaction Tk has lookups k from Tj and k is committed with j <i < k, then tryCi () returns abort.

2 otherwise, the transaction Ti is allowed to commit.

IIT Hyderbad, INDIA MV-OSTMs 27 / 43

Page 57: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Proposed Algorithm : MV-OSTMtryC() : t insert() method

VL(Version List)

RVL(Return Value List)

k1

0 v0 rvl1T

13 201675 2827 30

15 v5 F rvl2 25 v10 F

12 18 23 35

rvl3

40

Figure: Insert a version of key k1 by T40

IIT Hyderbad, INDIA MV-OSTMs 28 / 43

Page 58: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Proposed Algorithm : MV-OSTMtryC() : t insert() method cont’d..

VL(Version List)

RVL(Return Value List)

k1

0 v0 rvl1T

13 201675 2827 30

15 v5 F rvl2 25 v10 F

12 18 23 35

rvl3

40

Figure: T40 searching appropriate place in version list of k1

IIT Hyderbad, INDIA MV-OSTMs 29 / 43

Page 59: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Proposed Algorithm : MV-OSTMtryC() : t insert() method cont’d..

k1

0 v0 rvl1T

13 201675 2827 30

15 v5 F rvl2

12 18 23 35

40 F rvl3v1525 F rvl3v10

Figure: T40 successfully created a new version of k1

IIT Hyderbad, INDIA MV-OSTMs 30 / 43

Page 60: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Proposed Algorithm : MV-OSTMtryC() : t insert() method cont’d..

VL(Version List)

RVL(Return Value List)

k1

0 v0 rvl1T

13 201675 2827 30

15 v5 F rvl2 25 v10 F

12 18 23

rvl3

40

45c

Figure: Insert a version of key k1 by T40

IIT Hyderbad, INDIA MV-OSTMs 31 / 43

Page 61: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Proposed Algorithm : MV-OSTMtryC() : t insert() method cont’d..

VL(Version List)

RVL(Return Value List)

k1

0 v0 rvl1T

13 201675 2827 30

15 v5 F rvl2 25 v10 F

12 18 23

rvl3

40

45c

Figure: T40 searching appropriate place in version list of k1

IIT Hyderbad, INDIA MV-OSTMs 32 / 43

Page 62: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Proposed Algorithm : MV-OSTMtryC() : t insert() method cont’d..

VL(Version List)

RVL(Return Value List)

k1

0 v0 rvl1T

13 201675 2827 30

15 v5 F rvl2 25 v10 F

12 18 23

rvl3

40

45c

Figure: Abort T40 : T45 committed before T40

IIT Hyderbad, INDIA MV-OSTMs 33 / 43

Page 63: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Correctness of MV-OSTM g

Theorem (1)

Any history generated by HT-MVOSTM is opaque.

Theorem (2)

HT-MVOSTM with unbounded versions ensures that lookup methods donot return abort.

gArxiv Link: https://arxiv.org/abs/1712.09803

IIT Hyderbad, INDIA MV-OSTMs 34 / 43

Page 64: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Outline

1 Introduction to STMs

2 Problem with read-write STMs

3 Object Based STMs

4 Motivation towards MV-OSTM

5 Experimental Evaluation

6 Conclusion

7 Future Work

IIT Hyderbad, INDIA MV-OSTMs 35 / 43

Page 65: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Experimental Evaluation

Setup

Intel(R) Xeon(R) CPU, 32 GB RAM, 56 Threads.

We have compared proposed HT-MVOSTM with HT-OSTM / ElasticSTM(ESTM)a / Read Write STM (RWSTM) / Multi-Version Timestamp ordering Protocol(HT-MVTO).

We have compared proposed list-MVOSTM with list-OSTM /Boosted-list / NOrec-listb / Trans-listc / list-MVTO

aFelber, P., Gramoli, V., Guerraoui, R.: Elastic Transactions. J. Parallel Distrib. Comput.100(C), 2017

bDalessandro, L., Spear, M.F., Scott, M.L.: NOrec: Streamlining STM by Abolishing Own-ership Records. In

Govindarajan, R., Padua, D.A., Hall, M.W., eds.: PPOPP’10c

Zhang, D., Dechev, D.: Lock-free Transactions Without Rollbacks for Linked Data Structures. SPAA’16

IIT Hyderbad, INDIA MV-OSTMs 36 / 43

Page 66: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Experimental Evaluation Cont’d..

Lookup Intensive Workload: lookup:90%, insert:8% & delete:2%Update Intensive Workload: lookup:10%, insert:45% & delete:45%

2 4 8 1 6 3 2 6 40 . 0 0 0

0 . 0 0 2

0 . 0 0 4

0 . 0 0 6

0 . 0 0 8

0 . 0 1 0

2 4 8 1 6 3 2 6 40 . 0 0

0 . 0 5

0 . 1 0

0 . 1 5

0 . 2 0

0 . 2 5

0 . 3 0

( b ) U p d a t e I n t e n s i v e W o r k l o a d( a ) L o o k u p I n t e n s i v e W o r k l o a d

Time (

Sec.)

# o f t h r e a d s

H T - M V O S T M H T - O S T M E S T M R W S T M H T - M V T O

# o f t h r e a d s

Figure: Performance of HT-MVOSTM

Proposed HT-MVOSTM gives better performance while improving the concurrency.

IIT Hyderbad, INDIA MV-OSTMs 37 / 43

Page 67: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Experimental Evaluation Cont’d..

2 4 8 1 6 3 2 6 40 . 0 00 . 0 10 . 0 20 . 0 30 . 0 40 . 0 50 . 0 60 . 0 70 . 0 8

2 4 8 1 6 3 2 6 40 . 0

0 . 1

0 . 2

0 . 3

0 . 4

0 . 5

0 . 6

( b ) U p d a t e I n t e n s i v e W o r k l o a d( a ) L o o k u p I n t e n s i v e W o r k l o a d

Time (

Sec.)

# o f t h r e a d s

l i s t - M V O S T M l i s t - O S T M T r a n s - l i s t B o o s t i n g - l i s t N O r e c - l i s t l i s t - M V T O

# o f t h r e a d s

Figure: Performance of list-MVOSTM

Proposed list-MVOSTM gives better performance while improving the concurrency.

IIT Hyderbad, INDIA MV-OSTMs 38 / 43

Page 68: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Outline

1 Introduction to STMs

2 Problem with read-write STMs

3 Object Based STMs

4 Motivation towards MV-OSTM

5 Experimental Evaluation

6 Conclusion

7 Future Work

IIT Hyderbad, INDIA MV-OSTMs 39 / 43

Page 69: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Conclusion

We have combined both multi-version and OSTM ideas carefullycalled as MV-OSTM, for harnessing greater concurrency in STMs.

HT-MVOSTM shows average speedup of 6.3, 11.2, 4.7, 2.7 times forstate of the art HT-MVTO, RWSTM, ESTM & HT-OSTMrespectively.

The average speedup achieved by list-MVOSTM from state of the artlist-MVTO, NOrec-list, Boosting-list, Trans-list, list-OSTM are 91.5,29.5, 23, 24, 2.1 respectively.

IIT Hyderbad, INDIA MV-OSTMs 40 / 43

Page 70: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Conclusion

We have combined both multi-version and OSTM ideas carefullycalled as MV-OSTM, for harnessing greater concurrency in STMs.

HT-MVOSTM shows average speedup of 6.3, 11.2, 4.7, 2.7 times forstate of the art HT-MVTO, RWSTM, ESTM & HT-OSTMrespectively.

The average speedup achieved by list-MVOSTM from state of the artlist-MVTO, NOrec-list, Boosting-list, Trans-list, list-OSTM are 91.5,29.5, 23, 24, 2.1 respectively.

IIT Hyderbad, INDIA MV-OSTMs 40 / 43

Page 71: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Conclusion

We have combined both multi-version and OSTM ideas carefullycalled as MV-OSTM, for harnessing greater concurrency in STMs.

HT-MVOSTM shows average speedup of 6.3, 11.2, 4.7, 2.7 times forstate of the art HT-MVTO, RWSTM, ESTM & HT-OSTMrespectively.

The average speedup achieved by list-MVOSTM from state of the artlist-MVTO, NOrec-list, Boosting-list, Trans-list, list-OSTM are 91.5,29.5, 23, 24, 2.1 respectively.

IIT Hyderbad, INDIA MV-OSTMs 40 / 43

Page 72: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

Outline

1 Introduction to STMs

2 Problem with read-write STMs

3 Object Based STMs

4 Motivation towards MV-OSTM

5 Experimental Evaluation

6 Conclusion

7 Future Work

IIT Hyderbad, INDIA MV-OSTMs 41 / 43

Page 73: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

ProgressFuture Work

MV-OSTM model can be extended to Starvation-free multi-versionOSTM (SF-MVOSTM).

MV-OSTM can be enlarged to other data structures like Queue,Stack, Tree etc.

An interesting aspect is exploring Nestingh for MV-OSTM in whichone object-based transaction invokes other read-write transaction.

hNi, Yang and Menon, Vijay S. and Adl-Tabatabai, Ali-Reza and Hosking, Antony L. and Hudson, Richard L. and Moss, J.

Eliot B. and Saha, Bratin and Shpeisman, Tatiana, Open Nesting in Software Transactional Memory, PPoPP ’07

IIT Hyderbad, INDIA MV-OSTMs 42 / 43

Page 74: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

ProgressFuture Work

MV-OSTM model can be extended to Starvation-free multi-versionOSTM (SF-MVOSTM).

MV-OSTM can be enlarged to other data structures like Queue,Stack, Tree etc.

An interesting aspect is exploring Nestingh for MV-OSTM in whichone object-based transaction invokes other read-write transaction.

hNi, Yang and Menon, Vijay S. and Adl-Tabatabai, Ali-Reza and Hosking, Antony L. and Hudson, Richard L. and Moss, J.

Eliot B. and Saha, Bratin and Shpeisman, Tatiana, Open Nesting in Software Transactional Memory, PPoPP ’07

IIT Hyderbad, INDIA MV-OSTMs 42 / 43

Page 75: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

ProgressFuture Work

MV-OSTM model can be extended to Starvation-free multi-versionOSTM (SF-MVOSTM).

MV-OSTM can be enlarged to other data structures like Queue,Stack, Tree etc.

An interesting aspect is exploring Nestingh for MV-OSTM in whichone object-based transaction invokes other read-write transaction.

hNi, Yang and Menon, Vijay S. and Adl-Tabatabai, Ali-Reza and Hosking, Antony L. and Hudson, Richard L. and Moss, J.

Eliot B. and Saha, Bratin and Shpeisman, Tatiana, Open Nesting in Software Transactional Memory, PPoPP ’07

IIT Hyderbad, INDIA MV-OSTMs 42 / 43

Page 76: An Innovative Approach to Achieve Compositionality …sathya_p/index_files/PDFs/SSS...An Innovative Approach to Achieve Compositionality E ciently using Multi-Version Object Based

IIT Hyderbad, INDIA MV-OSTMs 43 / 43