+ All Categories
Home > Technology > Ring STM

Ring STM

Date post: 14-Apr-2017
Category:
Upload: amr-abed
View: 703 times
Download: 0 times
Share this document with a friend
35
RingSTM Presented by: Amr Abed
Transcript
Page 1: Ring STM

RingSTMPresented by: Amr Abed

Page 2: Ring STM

Title“RingSTM: Scalable Transactions with a Single Atomic Instruction”

AuthorsMichael F. Spear, Maged M. Michael, and Christoph von Praun

Published inThe 20th annual symposium on Parallelism in algorithms and architectures (SPAA)

Year2008

About the paper

Page 3: Ring STM

MotivationSystem OverviewHow it worksEvaluation

Outline

Page 4: Ring STM

MotivationSystem OverviewHow it worksEvaluation

Outline

Page 5: Ring STM

Motivation

Orec-based STMLocation-based metadataTX writing to W locations

O(W) CAS operationsCommitting R/W TX

O(R+W) overhead All validation done in CS

Ring STMTX-based metadataTX writing to W locations

No CAS operationsCommitting R/W TX

Single CAS operationBloom filters used for validation

Page 6: Ring STM

MotivationSystem OverviewHow it worksEvaluation

Outline

Page 7: Ring STM

Transaction

Write Buffer

StartTimestamp

Write FilterRead Filter

Page 8: Ring STM

The Ring

41

42

43

40

44

46

39

45

WritingComplete

index

Page 9: Ring STM

Ring Entry

CommitTimestamp

Write Filter

Status

Page 10: Ring STM

0 0 0 0 0 0 0 0 0 0 0 0 0 00015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Bloom Filter

Page 11: Ring STM

1 0 0 1 0 0 1 0 0 0 0 0 1 00015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

0 0 0 0 0 0 0 0 0 0 0 0 0 00015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Bloom Filter

Hash Functions

A

171013

Inserting A

Page 12: Ring STM

1 0 0 1 0 0 1 0 0 0 0 0 1 00015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

1 1 0 1 1 0 1 0 0 0 0 1 1 00015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Bloom Filter

Hash Functions

B

27912

Inserting B

Page 13: Ring STM

1 1 0 1 1 0 1 0 0 0 0 1 1 00015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

1 1 0 1 1 0 1 0 0 0 0 1 1 00015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Bloom Filter

Hash Functions

A

171013

Searching for A

Positive

Page 14: Ring STM

1 1 0 1 1 0 1 0 0 0 0 1 1 00015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

1 1 0 1 1 0 1 0 0 0 0 1 1 00015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Bloom Filter

Hash Functions

C

371012

Searching for C

Negativ

e

Page 15: Ring STM

1 1 0 1 1 0 1 0 0 0 0 1 1 00015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

1 1 0 1 1 0 1 0 0 0 0 1 1 00015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Bloom Filter

Hash Functions

D

271012

Searching for D

False Positive

Page 16: Ring STM

MotivationSystem OverviewHow it worksEvaluation

Outline

Page 17: Ring STM

Start

index

New Transaction

41

42

43

40

44

46

39

45 WritingComplete

Write Buffer

Start Time43

Write FilterRead Filter

Page 18: Ring STM

1 0 0 1 0 0 1 0 0 0 0 0 1 00015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

1 1 0 1 0 0 1 0 0 0 1 0 1 00015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

On Write

Hash Functions

Address

171012

Write filter

Add address to Write set

Page 19: Ring STM

1 0 0 1 0 0 1 0 0 0 0 0 1 00015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

1 1 0 1 0 0 1 0 0 0 1 0 1 00015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

On Write

Hash Functions

Address

171012

Write filter

Write Buffer

Value

Address

Add <address, value> to Write buffer

Page 20: Ring STM

1 1 0 1 1 0 1 0 0 0 0 1 1 00015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

1 1 0 1 1 0 1 0 0 0 0 1 1 00015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

On Read

Hash Functions

Address

171013

Address is in Write set

Write filter

Page 21: Ring STM

On Read

Get value from write buffer

Write Buffer

Value

Address

1 1 0 1 1 0 1 0 0 0 0 1 1 00015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

1 1 0 1 1 0 1 0 0 0 0 1 1 00015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Hash Functions

Address

171013

Write filter

Page 22: Ring STM

1 1 0 1 1 0 1 0 0 0 0 1 1 00015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

1 1 0 1 1 0 1 0 0 0 0 1 1 00015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

On Read

Hash Functions

Address

371012

Address is not in Write Set

Write filter

Page 23: Ring STM

On Read

1 1 0 1 1 0 1 0 0 0 0 1 1 00015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

1 1 0 1 1 0 1 0 0 0 0 1 1 00015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Hash Functions

Address

371012

Get value from memory

Write filter

Memory

Value

Address

Page 24: Ring STM

1 1 0 1 1 0 1 0 0 0 1 1 1 00015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

1 0 0 1 1 0 1 0 0 0 0 1 1 00015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

On Read

Hash Functions

Address

371012

Add address to read set

Read filter

Page 25: Ring STM

Write Buffer

Start Time43

Write FilterRead Filter

index

On Read

41

42

43

40

44

46

39

45Read Filter

Start Time44

Check for conflicts

Page 26: Ring STM

Write Buffer

Start Time43

Write FilterRead Filter

index

On Commit

41

42

43

40

44

46

39

45

47

Add new entry, and update index

Page 27: Ring STM

Write Buffer

Start Time43

Write FilterRead Filter

index

On Commit

41

42

43

40

44

46

47

45

Write Filter

Check for conflicting writers

Page 28: Ring STM

On Commit

Memory

Address

WriteBuffer

Address

If no conflicts, write to memory

Page 29: Ring STM

index

On Commit

41

42

43

40

44

46

47

45 4445

46

47

Set status to complete

Page 30: Ring STM

MotivationSystem OverviewHow it worksEvaluation

Outline

Page 31: Ring STM

Results

Page 32: Ring STM

Results

Page 33: Ring STM

Results

Page 34: Ring STM

Use of Bloom filter accelerates validation Single RMW operation to commit Trade-off between size of Bloom filter and

false conflicts Ring size is a bottleneck for large number of

threads

Summary

Page 35: Ring STM

Thank you


Recommended