SlideShare a Scribd company logo
Scalable Computing Systems Laboratory
Hanyang University
Update Change
1
2
Existing Update Method
1. TraverseReadOptimized() to check old & new value's existence
2. Traverse() to locate leaf node to insert 'delete delta'
3. update Mapping Table using CAS operation
4. Traverse() to locate leaf node to insert 'insert delta'
5. update Mapping Table using CAS operation
① TraverseReadOptimized()
Node R
3
Existing Update Method
1. TraverseReadOptimized() to check old & new value's existence
2. Traverse() to locate leaf node to insert 'delete delta'
3. update Mapping Table using CAS operation
4. Traverse() to locate leaf node to insert 'insert delta'
5. update Mapping Table using CAS operation
② Traverse()
If <key, oldVal> does not exist:
update() returns false
Node R
PID Ptr
L
P
R
S
4
Existing Update Method
Δ
Δ delete
Node R
③ CAS
1. TraverseReadOptimized() to check old & new value's existence
2. Traverse() to locate leaf node to insert 'delete delta'
3. update Mapping Table using CAS operation
4. Traverse() to locate leaf node to insert 'insert delta'
5. update Mapping Table using CAS operation
Node R
5
Existing Update Method
Δ
Δ delete
PID Ptr
L
P
R
S
Node R
1. TraverseReadOptimized() to check old & new value's existence
2. Traverse() to locate leaf node to insert 'delete delta'
3. update Mapping Table using CAS operation If CAS failed: repeat ② ~ ③
4. Traverse() to locate leaf node to insert 'insert delta'
5. update Mapping Table using CAS operation
Node R
③ CAS
6
Existing Update Method
1. TraverseReadOptimized() to check old & new value's existence
2. Traverse() to locate leaf node to insert 'delete delta'
3. update Mapping Table using CAS operation
4. Traverse() to locate leaf node to insert 'insert delta'
5. update Mapping Table using CAS operation
④ Traverse()
If <key, newVal> exists:
update() assert fails
Node R
PID Ptr
L
P
R
S
7
Existing Update Method
Δ
Δ delete
Node R
1. TraverseReadOptimized() to check old & new value's existence
2. Traverse() to locate leaf node to insert 'delete delta'
3. update Mapping Table using CAS operation
4. Traverse() to locate leaf node to insert 'insert delta'
5. update Mapping Table using CAS operation If CAS failed: repeat ④ ~ ⑤
⑤ CAS Δ insert
Node R
PID Ptr
L
P
R
S
8
Existing Update Method
Δ
Δ delete
Node R
Δ insert
Node R
Problems
1. Operation is not atomic (2 CAS operations involved)
Any operation accessing <key, newVal> or <key, oldVal>
between first & second CAS will be failed.
2. Traverse() is called at least 3 times
All traverse() returns same node.
9
Existing Update Method
Solutions
1. link Δ delete and Δ insert and use CAS only once to change Mapping Table.
2. Create new Traverse() that checks two <key, value> at once.
Problems
1. Operation is not atomic (2 CAS operations involved)
Any operation accessing <key, newVal> or <key, oldVal>
between first & second CAS will be failed.
2. Traverse() is called at least 3 times
All traverse() returns same node.
PID Ptr
L
P
R
S
Δ
Δ delete
Node R
Δ insert
Node R
10
New Update Method
① NewTraverse()
Node R
1. Use NewTraverse() that returns two <key, val> pairs
There is 3 reason for update() to fail
1. NewTraverse() aborted, returning nullptr
2. <key, oldValue> does not exist
3. <key, newValue> already exist
2. Create Δdelete & Δinsert on top of base node without modifying Mapping Table
3. Use CAS operation to modify mapping table If CAS failed: repeat ① ~ ③
PID Ptr
L
P
R
S
11
New Update Method
Δ
Δ delete
Node R
Δ insert
Node R
② Create Δdelete & Δinsert
Two combined Δ work as one Δupda
1. Use NewTraverse() that returns two <key, val> pairs
There is 3 reason for update() to fail
1. NewTraverse() aborted, returning nullptr
2. <key, oldValue> does not exist
3. <key, newValue> already exist
2. Create Δdelete & Δinsert on top of base node without modifying Mapping Table
3. Use CAS operation to modify mapping table If CAS failed: repeat ① ~ ③
PID Ptr
L
P
R
S
12
New Update Method
Δ
Δ delete
Node R
Δ insert
Node R
③ CAS
1. Use NewTraverse() that returns two <key, val> pairs
There is 3 reason for update() to fail
1. NewTraverse() aborted, returning nullptr
2. <key, oldValue> does not exist
3. <key, newValue> already exist
2. Create Δdelete & Δinsert on top of base node without modifying Mapping Table
3. Use CAS operation to modify mapping table If CAS failed: repeat ① ~ ③
PID Ptr
L
P
R
S
13
New Update Method
Δ
Δ delete
Node R
Δ insert
Node R
③ CAS
Advantage
1. Update operation is atomic
only one CAS operation is performed
2. Traverse() is called only once per each CAS operation
Reducing redundant tree traversal
14
New Update Method
362,785,060
127,015,726
835,6980 0 0
0
100000000
200000000
300000000
400000000
1 100 10000
#ofupdatefailure
# of update key
prev Update() new Update()
avg. failure of 5 tests (44threads, total 88000000 updates)
New Update() shows no failure what so ever.
Scalable Computing Systems Laboratory
Hanyang University
Thank You
15

More Related Content

What's hot

Functional Programming for OO Programmers (part 2)
Functional Programming for OO Programmers (part 2)Functional Programming for OO Programmers (part 2)
Functional Programming for OO Programmers (part 2)Calvin Cheng
 
Chart parsing with features
Chart parsing with featuresChart parsing with features
Chart parsing with featuresSRah Sanei
 
Parboiled explained
Parboiled explainedParboiled explained
Parboiled explainedPaul Popoff
 
Qtp certification questions and tutorial
Qtp certification questions and tutorialQtp certification questions and tutorial
Qtp certification questions and tutorialRamu Palanki
 
Merge sort code in C explained
Merge sort code in C explained Merge sort code in C explained
Merge sort code in C explained Mohit Tare
 
Java in the Past, Java in the Future
Java in the Past, Java in the FutureJava in the Past, Java in the Future
Java in the Past, Java in the FutureYuichi Sakuraba
 
Promise of an API
Promise of an APIPromise of an API
Promise of an APIMaxim Zaks
 
Isc computer project final upload last
Isc computer project final upload lastIsc computer project final upload last
Isc computer project final upload lastArunav Ray
 
QUEUE || FUNCTION WRITING BASED ON QUEUE || LINKED LIST || DATA STRUCTURE || ...
QUEUE || FUNCTION WRITING BASED ON QUEUE || LINKED LIST || DATA STRUCTURE || ...QUEUE || FUNCTION WRITING BASED ON QUEUE || LINKED LIST || DATA STRUCTURE || ...
QUEUE || FUNCTION WRITING BASED ON QUEUE || LINKED LIST || DATA STRUCTURE || ...AAKASH KUMAR
 
PostgreSQL10の新機能 ~ロジカルレプリケーションを中心に~
PostgreSQL10の新機能 ~ロジカルレプリケーションを中心に~PostgreSQL10の新機能 ~ロジカルレプリケーションを中心に~
PostgreSQL10の新機能 ~ロジカルレプリケーションを中心に~Atsushi Torikoshi
 
The Ring programming language version 1.6 book - Part 8 of 189
The Ring programming language version 1.6 book - Part 8 of 189The Ring programming language version 1.6 book - Part 8 of 189
The Ring programming language version 1.6 book - Part 8 of 189Mahmoud Samir Fayed
 
Performance testing of microservices in Action
Performance testing of microservices in ActionPerformance testing of microservices in Action
Performance testing of microservices in ActionAlexander Kachur
 
2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CSAAKASH KUMAR
 
STACK || FUNCTION WRITING BASED ON STACK || DATA STRUCTURE || LINKED LIST || ...
STACK || FUNCTION WRITING BASED ON STACK || DATA STRUCTURE || LINKED LIST || ...STACK || FUNCTION WRITING BASED ON STACK || DATA STRUCTURE || LINKED LIST || ...
STACK || FUNCTION WRITING BASED ON STACK || DATA STRUCTURE || LINKED LIST || ...AAKASH KUMAR
 

What's hot (17)

Functional Programming for OO Programmers (part 2)
Functional Programming for OO Programmers (part 2)Functional Programming for OO Programmers (part 2)
Functional Programming for OO Programmers (part 2)
 
Chart parsing with features
Chart parsing with featuresChart parsing with features
Chart parsing with features
 
Ch17
Ch17Ch17
Ch17
 
Parboiled explained
Parboiled explainedParboiled explained
Parboiled explained
 
Qtp certification questions and tutorial
Qtp certification questions and tutorialQtp certification questions and tutorial
Qtp certification questions and tutorial
 
Stacks queues
Stacks queuesStacks queues
Stacks queues
 
Merge sort code in C explained
Merge sort code in C explained Merge sort code in C explained
Merge sort code in C explained
 
Git使用
Git使用Git使用
Git使用
 
Java in the Past, Java in the Future
Java in the Past, Java in the FutureJava in the Past, Java in the Future
Java in the Past, Java in the Future
 
Promise of an API
Promise of an APIPromise of an API
Promise of an API
 
Isc computer project final upload last
Isc computer project final upload lastIsc computer project final upload last
Isc computer project final upload last
 
QUEUE || FUNCTION WRITING BASED ON QUEUE || LINKED LIST || DATA STRUCTURE || ...
QUEUE || FUNCTION WRITING BASED ON QUEUE || LINKED LIST || DATA STRUCTURE || ...QUEUE || FUNCTION WRITING BASED ON QUEUE || LINKED LIST || DATA STRUCTURE || ...
QUEUE || FUNCTION WRITING BASED ON QUEUE || LINKED LIST || DATA STRUCTURE || ...
 
PostgreSQL10の新機能 ~ロジカルレプリケーションを中心に~
PostgreSQL10の新機能 ~ロジカルレプリケーションを中心に~PostgreSQL10の新機能 ~ロジカルレプリケーションを中心に~
PostgreSQL10の新機能 ~ロジカルレプリケーションを中心に~
 
The Ring programming language version 1.6 book - Part 8 of 189
The Ring programming language version 1.6 book - Part 8 of 189The Ring programming language version 1.6 book - Part 8 of 189
The Ring programming language version 1.6 book - Part 8 of 189
 
Performance testing of microservices in Action
Performance testing of microservices in ActionPerformance testing of microservices in Action
Performance testing of microservices in Action
 
2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
 
STACK || FUNCTION WRITING BASED ON STACK || DATA STRUCTURE || LINKED LIST || ...
STACK || FUNCTION WRITING BASED ON STACK || DATA STRUCTURE || LINKED LIST || ...STACK || FUNCTION WRITING BASED ON STACK || DATA STRUCTURE || LINKED LIST || ...
STACK || FUNCTION WRITING BASED ON STACK || DATA STRUCTURE || LINKED LIST || ...
 

Similar to Bw-Tree Update Implementation

DOAG: Visual SQL Tuning
DOAG: Visual SQL TuningDOAG: Visual SQL Tuning
DOAG: Visual SQL TuningKyle Hailey
 
lecture7.ppt
lecture7.pptlecture7.ppt
lecture7.pptEdFeranil
 
Idea for ineractive programming language
Idea for ineractive programming languageIdea for ineractive programming language
Idea for ineractive programming languageLincoln Hannah
 
Doubly & Circular Linked Lists
Doubly & Circular Linked ListsDoubly & Circular Linked Lists
Doubly & Circular Linked ListsAfaq Mansoor Khan
 
Removal Of Recursion
Removal Of RecursionRemoval Of Recursion
Removal Of RecursionRicha Sharma
 
Week12 graph
Week12   graph Week12   graph
Week12 graph IIUM
 
Sorted number list implementation with linked listsStep 1 Inspec.pdf
 Sorted number list implementation with linked listsStep 1 Inspec.pdf Sorted number list implementation with linked listsStep 1 Inspec.pdf
Sorted number list implementation with linked listsStep 1 Inspec.pdfalmaniaeyewear
 
Sheet1Amys One Day Food RecallHeight 5 ft 8 inchesAge 19Weight.docx
Sheet1Amys One Day Food RecallHeight 5 ft 8 inchesAge 19Weight.docxSheet1Amys One Day Food RecallHeight 5 ft 8 inchesAge 19Weight.docx
Sheet1Amys One Day Food RecallHeight 5 ft 8 inchesAge 19Weight.docxedgar6wallace88877
 
Cheatsheet_Python.pdf
Cheatsheet_Python.pdfCheatsheet_Python.pdf
Cheatsheet_Python.pdfRamyaR163211
 
cs201-list-stack-queue.ppt
cs201-list-stack-queue.pptcs201-list-stack-queue.ppt
cs201-list-stack-queue.pptRahulYadav738822
 
CppConcurrencyInAction - Chapter07
CppConcurrencyInAction - Chapter07CppConcurrencyInAction - Chapter07
CppConcurrencyInAction - Chapter07DooSeon Choi
 
Matrix Multiplication(An example of concurrent programming)
Matrix Multiplication(An example of concurrent programming)Matrix Multiplication(An example of concurrent programming)
Matrix Multiplication(An example of concurrent programming)Pramit Kumar
 
Consider this code using the ArrayBag of Section 5.2 and the Locat.docx
Consider this code using the ArrayBag of Section 5.2 and the Locat.docxConsider this code using the ArrayBag of Section 5.2 and the Locat.docx
Consider this code using the ArrayBag of Section 5.2 and the Locat.docxmaxinesmith73660
 
How do you stop infinite loop Because I believe that it is making a.pdf
How do you stop infinite loop Because I believe that it is making a.pdfHow do you stop infinite loop Because I believe that it is making a.pdf
How do you stop infinite loop Because I believe that it is making a.pdffeelinggift
 
Lecture 9_Classes.pptx
Lecture 9_Classes.pptxLecture 9_Classes.pptx
Lecture 9_Classes.pptxNelyJay
 
Algorithim lec1.pptx
Algorithim lec1.pptxAlgorithim lec1.pptx
Algorithim lec1.pptxrediet43
 
Need help getting past an error in C++! I have all my code pasted down.docx
Need help getting past an error in C++! I have all my code pasted down.docxNeed help getting past an error in C++! I have all my code pasted down.docx
Need help getting past an error in C++! I have all my code pasted down.docxJason0x0Scottw
 

Similar to Bw-Tree Update Implementation (20)

Data Structure and Algorithm
Data Structure and AlgorithmData Structure and Algorithm
Data Structure and Algorithm
 
DOAG: Visual SQL Tuning
DOAG: Visual SQL TuningDOAG: Visual SQL Tuning
DOAG: Visual SQL Tuning
 
lecture7.ppt
lecture7.pptlecture7.ppt
lecture7.ppt
 
Idea for ineractive programming language
Idea for ineractive programming languageIdea for ineractive programming language
Idea for ineractive programming language
 
Doubly & Circular Linked Lists
Doubly & Circular Linked ListsDoubly & Circular Linked Lists
Doubly & Circular Linked Lists
 
Removal Of Recursion
Removal Of RecursionRemoval Of Recursion
Removal Of Recursion
 
Week12 graph
Week12   graph Week12   graph
Week12 graph
 
Sorted number list implementation with linked listsStep 1 Inspec.pdf
 Sorted number list implementation with linked listsStep 1 Inspec.pdf Sorted number list implementation with linked listsStep 1 Inspec.pdf
Sorted number list implementation with linked listsStep 1 Inspec.pdf
 
Lab 1
Lab 1Lab 1
Lab 1
 
Sheet1Amys One Day Food RecallHeight 5 ft 8 inchesAge 19Weight.docx
Sheet1Amys One Day Food RecallHeight 5 ft 8 inchesAge 19Weight.docxSheet1Amys One Day Food RecallHeight 5 ft 8 inchesAge 19Weight.docx
Sheet1Amys One Day Food RecallHeight 5 ft 8 inchesAge 19Weight.docx
 
Cheatsheet_Python.pdf
Cheatsheet_Python.pdfCheatsheet_Python.pdf
Cheatsheet_Python.pdf
 
cs201-list-stack-queue.ppt
cs201-list-stack-queue.pptcs201-list-stack-queue.ppt
cs201-list-stack-queue.ppt
 
CppConcurrencyInAction - Chapter07
CppConcurrencyInAction - Chapter07CppConcurrencyInAction - Chapter07
CppConcurrencyInAction - Chapter07
 
Matrix Multiplication(An example of concurrent programming)
Matrix Multiplication(An example of concurrent programming)Matrix Multiplication(An example of concurrent programming)
Matrix Multiplication(An example of concurrent programming)
 
Recursion.pptx
Recursion.pptxRecursion.pptx
Recursion.pptx
 
Consider this code using the ArrayBag of Section 5.2 and the Locat.docx
Consider this code using the ArrayBag of Section 5.2 and the Locat.docxConsider this code using the ArrayBag of Section 5.2 and the Locat.docx
Consider this code using the ArrayBag of Section 5.2 and the Locat.docx
 
How do you stop infinite loop Because I believe that it is making a.pdf
How do you stop infinite loop Because I believe that it is making a.pdfHow do you stop infinite loop Because I believe that it is making a.pdf
How do you stop infinite loop Because I believe that it is making a.pdf
 
Lecture 9_Classes.pptx
Lecture 9_Classes.pptxLecture 9_Classes.pptx
Lecture 9_Classes.pptx
 
Algorithim lec1.pptx
Algorithim lec1.pptxAlgorithim lec1.pptx
Algorithim lec1.pptx
 
Need help getting past an error in C++! I have all my code pasted down.docx
Need help getting past an error in C++! I have all my code pasted down.docxNeed help getting past an error in C++! I have all my code pasted down.docx
Need help getting past an error in C++! I have all my code pasted down.docx
 

Recently uploaded

10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdf10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdfkalichargn70th171
 
INGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignINGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignNeo4j
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationWave PLM
 
The Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion ProductionThe Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion ProductionWave PLM
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...Alluxio, Inc.
 
JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)Max Lee
 
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with StrimziStrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzisteffenkarlsson2
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Soroosh Khodami
 
A Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data MigrationA Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data MigrationHelp Desk Migration
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabbereGrabber
 
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1KnowledgeSeed
 
how-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdfhow-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdfMehmet Akar
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Krakówbim.edu.pl
 
iGaming Platform & Lottery Solutions by Skilrock
iGaming Platform & Lottery Solutions by SkilrockiGaming Platform & Lottery Solutions by Skilrock
iGaming Platform & Lottery Solutions by SkilrockSkilrock Technologies
 
Workforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdfWorkforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdfDeskTrack
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...rajkumar669520
 
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Gáspár Nagy
 
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfmbmh111980
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfkalichargn70th171
 

Recently uploaded (20)

10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdf10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdf
 
INGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignINGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by Design
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM Integration
 
The Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion ProductionThe Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion Production
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
 
JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)
 
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with StrimziStrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024
 
A Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data MigrationA Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data Migration
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabber
 
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
 
how-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdfhow-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdf
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Kraków
 
iGaming Platform & Lottery Solutions by Skilrock
iGaming Platform & Lottery Solutions by SkilrockiGaming Platform & Lottery Solutions by Skilrock
iGaming Platform & Lottery Solutions by Skilrock
 
5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand
 
Workforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdfWorkforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdf
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
 
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
 
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
 

Bw-Tree Update Implementation

  • 1. Scalable Computing Systems Laboratory Hanyang University Update Change 1
  • 2. 2 Existing Update Method 1. TraverseReadOptimized() to check old & new value's existence 2. Traverse() to locate leaf node to insert 'delete delta' 3. update Mapping Table using CAS operation 4. Traverse() to locate leaf node to insert 'insert delta' 5. update Mapping Table using CAS operation ① TraverseReadOptimized() Node R
  • 3. 3 Existing Update Method 1. TraverseReadOptimized() to check old & new value's existence 2. Traverse() to locate leaf node to insert 'delete delta' 3. update Mapping Table using CAS operation 4. Traverse() to locate leaf node to insert 'insert delta' 5. update Mapping Table using CAS operation ② Traverse() If <key, oldVal> does not exist: update() returns false Node R
  • 4. PID Ptr L P R S 4 Existing Update Method Δ Δ delete Node R ③ CAS 1. TraverseReadOptimized() to check old & new value's existence 2. Traverse() to locate leaf node to insert 'delete delta' 3. update Mapping Table using CAS operation 4. Traverse() to locate leaf node to insert 'insert delta' 5. update Mapping Table using CAS operation Node R
  • 5. 5 Existing Update Method Δ Δ delete PID Ptr L P R S Node R 1. TraverseReadOptimized() to check old & new value's existence 2. Traverse() to locate leaf node to insert 'delete delta' 3. update Mapping Table using CAS operation If CAS failed: repeat ② ~ ③ 4. Traverse() to locate leaf node to insert 'insert delta' 5. update Mapping Table using CAS operation Node R ③ CAS
  • 6. 6 Existing Update Method 1. TraverseReadOptimized() to check old & new value's existence 2. Traverse() to locate leaf node to insert 'delete delta' 3. update Mapping Table using CAS operation 4. Traverse() to locate leaf node to insert 'insert delta' 5. update Mapping Table using CAS operation ④ Traverse() If <key, newVal> exists: update() assert fails Node R
  • 7. PID Ptr L P R S 7 Existing Update Method Δ Δ delete Node R 1. TraverseReadOptimized() to check old & new value's existence 2. Traverse() to locate leaf node to insert 'delete delta' 3. update Mapping Table using CAS operation 4. Traverse() to locate leaf node to insert 'insert delta' 5. update Mapping Table using CAS operation If CAS failed: repeat ④ ~ ⑤ ⑤ CAS Δ insert Node R
  • 8. PID Ptr L P R S 8 Existing Update Method Δ Δ delete Node R Δ insert Node R Problems 1. Operation is not atomic (2 CAS operations involved) Any operation accessing <key, newVal> or <key, oldVal> between first & second CAS will be failed. 2. Traverse() is called at least 3 times All traverse() returns same node.
  • 9. 9 Existing Update Method Solutions 1. link Δ delete and Δ insert and use CAS only once to change Mapping Table. 2. Create new Traverse() that checks two <key, value> at once. Problems 1. Operation is not atomic (2 CAS operations involved) Any operation accessing <key, newVal> or <key, oldVal> between first & second CAS will be failed. 2. Traverse() is called at least 3 times All traverse() returns same node. PID Ptr L P R S Δ Δ delete Node R Δ insert Node R
  • 10. 10 New Update Method ① NewTraverse() Node R 1. Use NewTraverse() that returns two <key, val> pairs There is 3 reason for update() to fail 1. NewTraverse() aborted, returning nullptr 2. <key, oldValue> does not exist 3. <key, newValue> already exist 2. Create Δdelete & Δinsert on top of base node without modifying Mapping Table 3. Use CAS operation to modify mapping table If CAS failed: repeat ① ~ ③
  • 11. PID Ptr L P R S 11 New Update Method Δ Δ delete Node R Δ insert Node R ② Create Δdelete & Δinsert Two combined Δ work as one Δupda 1. Use NewTraverse() that returns two <key, val> pairs There is 3 reason for update() to fail 1. NewTraverse() aborted, returning nullptr 2. <key, oldValue> does not exist 3. <key, newValue> already exist 2. Create Δdelete & Δinsert on top of base node without modifying Mapping Table 3. Use CAS operation to modify mapping table If CAS failed: repeat ① ~ ③
  • 12. PID Ptr L P R S 12 New Update Method Δ Δ delete Node R Δ insert Node R ③ CAS 1. Use NewTraverse() that returns two <key, val> pairs There is 3 reason for update() to fail 1. NewTraverse() aborted, returning nullptr 2. <key, oldValue> does not exist 3. <key, newValue> already exist 2. Create Δdelete & Δinsert on top of base node without modifying Mapping Table 3. Use CAS operation to modify mapping table If CAS failed: repeat ① ~ ③
  • 13. PID Ptr L P R S 13 New Update Method Δ Δ delete Node R Δ insert Node R ③ CAS Advantage 1. Update operation is atomic only one CAS operation is performed 2. Traverse() is called only once per each CAS operation Reducing redundant tree traversal
  • 14. 14 New Update Method 362,785,060 127,015,726 835,6980 0 0 0 100000000 200000000 300000000 400000000 1 100 10000 #ofupdatefailure # of update key prev Update() new Update() avg. failure of 5 tests (44threads, total 88000000 updates) New Update() shows no failure what so ever.
  • 15. Scalable Computing Systems Laboratory Hanyang University Thank You 15