Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

0

Share

Download to read offline

Bw-Tree TaS Implementation Design

Download to read offline

Ways to implement TaS for mapping table in Bw-Tree

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to like this

Bw-Tree TaS Implementation Design

  1. 1. PID Ptr 1 TAS ( ) 1. metadata update 2. invalidation check Invalidation Check next node ~~~ delta chain lookup insert 1. <key, value> insert node 2. update node <key, value> delete 1. <key, value> delete node 2. update node <key, value> update 1. <key, value> delete node 2. <key, value> insert node 3. <key, value> update node 4. <key, value> update node Implementation
  2. 2. PID Ptr 0 1 2 node ( )1 2 node 1 -> 2 TAS Implementation
  3. 3. PID Ptr 0 1 2 node ( )1 2 node 1 -> 2 TAS 1: TAS == . Delta chain lookup Implementation
  4. 4. PID Ptr 0 1 1 2 node 1 -> 2 TAS 1: TAS == . Delta chain lookup 2: TAS 1 . 0 delta chain lookup 2 node ( ) Implementation
  5. 5. PID Ptr 0 1 2 3 4 5 Delta Chain Lookup 1: - 2: 1 3: 1~2 4: 1~3 5: 1~4 1~5 delta node Delta Node Insertion Workflow Previous: do { check abort create delta node } while (CAS) TAS: check abort create delta node TAS Invalidation check & metadata update Invalidation check & metadata update: node ( delta node ) . length < # of threads Invalidation Check
  6. 6. PID Ptr 0 1 2 3 4 5 1~5 delta node : 1. Invalidation check node ?
 valid / invalid 2. Abort delta node handling issue
 invalid node ?
 1) prev node next pointer next pointer => TAS ?
 
 
 
 
 
 
 2) node validation bit Invalidation Check
  7. 7. PID Ptr i <5, 5> i <4, 4> i <3, 3> i <2, 2> i <1, 1> 1: i <6, 6> 2: i <7, 7> 3: i <6, 6> 4: d <5, 5> 5: d <5, 5> Traverse 1~5 delta node Invalidation Check not yet finished. (Consider as Valid) Invalid delta node. Valid delta node. Node Traverse(lookup) requested by other thread. Invalidation Check in progress
  8. 8. PID Ptr i <5, 5> i <4, 4> i <3, 3> i <2, 2> i <1, 1> 1: i <6, 6> 2: i <7, 7> 3: i <6, 6> 4: d <5, 5> 5: d <5, 5> Traverse present_set i <6, 6> i <7, 7> i <6, 6> i <5, 5> i <4, 4> i <3, 3> i <2, 2> i <1, 1> deleted_set 
 d <5, 5> d <5, 5> = <1, 1> <2, 2> <3, 3> <4, 4> <5, 5> <6, 6> <7, 7>
  9. 9. PID Ptr 0: i <5, 5> i <4, 4> i <3, 3> i <2, 2> i <1, 1> 1: i <6, 6> 2: i <7, 7> 3: i <6, 6> 4: d <5, 5> 5: d <5, 5> Traverse Check delta Node 2 & 1
 (since node 0 is initial starting point) 2: i <7, 7> => OK 1: i <6, 6> => invariant doesn't hold. 
 set invalid bit
  10. 10. PID Ptr 0: i <5, 5> i <4, 4> i <3, 3> i <2, 2> i <1, 1> 1: i <6, 6> 2: i <7, 7> 3: i <6, 6> 4: d <5, 5> 5: d <5, 5> Traverse present_set i <6, 6> i <7, 7> i <6, 6> i <5, 5> i <4, 4> i <3, 3> i <2, 2> i <1, 1> deleted_set 
 d <5, 5> d <5, 5> = <1, 1> <2, 2> <3, 3> <4, 4> <5, 5> <6, 6> <7, 7>
  11. 11. PID Ptr 0: i <5, 5> i <4, 4> i <3, 3> i <2, 2> i <1, 1> 1: i <6, 6> 2: i <7, 7> 3: i <6, 6> 4: d <5, 5> 5: d <5, 5> Traverse Check delta Node until reaching node 0
 (since node 0 is initial starting point) Both delta node is valid.
  12. 12. PID Ptr 0: i <5, 5> i <4, 4> i <3, 3> i <2, 2> i <1, 1> 1: i <6, 6> 2: i <7, 7> 3: i <6, 6> 4: d <5, 5> 5: d <5, 5> Traverse Check delta Node until reaching node 0
 (since node 0 is initial starting point) No matter which node starts invalidation check first,
 node 4 will be checked as valid
 and node 5 will set invalid bit.
  13. 13. PID Ptr 0: i <5, 5> i <4, 4> i <3, 3> i <2, 2> i <1, 1> 1: i <6, 6> 2: i <7, 7> 3: i <6, 6> 4: d <5, 5> 5: d <5, 5> Traverse present_set i <6, 6> i <7, 7> i <6, 6> i <5, 5> i <4, 4> i <3, 3> i <2, 2> i <1, 1> deleted_set 
 d <5, 5> d <5, 5> = <1, 1> <2, 2> <3, 3> <4, 4> <5, 5> <6, 6> <7, 7>
  14. 14. PID Ptr 0: i <5, 5> i <4, 4> i <3, 3> i <2, 2> i <1, 1> 1: i <6, 6> 2: i <7, 7> 3: i <6, 6> 4: d <5, 5> 5: d <5, 5> Traverse <1, 1> <2, 2> <3, 3> <4, 4> <5, 5> <6, 6> <7, 7> node traverse .
 delta node .
 e.g.) i <8, 8> & d <8, 8>
 <8, 8> : abort i <8, 8>
 <8, 8> : abort d <8, 8>

Ways to implement TaS for mapping table in Bw-Tree

Views

Total views

1,738

On Slideshare

0

From embeds

0

Number of embeds

1,630

Actions

Downloads

1

Shares

0

Comments

0

Likes

0

×