SlideShare une entreprise Scribd logo
1  sur  15
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

Contenu connexe

Tendances

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
 

Tendances (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 || ...
 

Similaire à 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
 

Similaire à 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
 

Dernier

Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfIdiosysTechnologies1
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 

Dernier (20)

Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdf
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 

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