from lock free to wait free linked list
play

From Lock-Free to Wait-Free: Linked List Edward Duong Outline 1) - PowerPoint PPT Presentation

From Lock-Free to Wait-Free: Linked List Edward Duong Outline 1) Outline operations of the locality conscious linked list [Braginsky 2012] 2) Transformation concept from lock-free -> wait-free [Timnat 2014] Why Build Concurrent ADTs


  1. From Lock-Free to Wait-Free: Linked List Edward Duong

  2. Outline 1) Outline operations of the locality conscious linked list [Braginsky 2012] 2) Transformation concept from lock-free -> wait-free [Timnat 2014]

  3. Why Build Concurrent ADTs ● Leverage multi-cores for speed and throughput i.e., how many operations can we perform at once ● Achieving performance guarantees for applications such as real-time systems

  4. Brief History Wait-Free (WF) and Lock-Free (LF) ADTs: 1993 - Queue (WF) - Herlihy 1995 - Linked List (LF) - Valois 2002 - Hash Tables (LF) - Michael 2005 - B-Tree (LF) - Bender 2010 - Locality-conscious Linked List (LF) - Braginsky and Petrank 2012 - B+Tree (LF) - Braginsky and Petrank

  5. Freedom! Increase in guarantees Blocking - Operations use heavy mutual exclusion Terminology from M. Herlihy [1988, 1990]

  6. Freedom! Obstruction-free Increase in guarantees - Guaranteed to complete an operation if there is no contention Blocking - Operations are serialized Terminology from M. Herlihy [1988, 1990]

  7. Freedom! Lock-free - Even with contention, at least one operation will succeed Obstruction-free Increase in guarantees - Guaranteed to complete an operation if there is no contention Blocking - Operations are serialized Terminology from M. Herlihy [1988, 1990]

  8. Freedom! Wait-free - Even with contention, all operations are bounded Lock-free - Even with contention, at least one operation will succeed Obstruction-free Increase in guarantees - Guaranteed to complete an operation if there is no contention Blocking - Operations are serialized Terminology from M. Herlihy [1988, 1990]

  9. Freedom! Wait-free - Even with contention, all operations are bounded = Lock-free - Even with contention, at least one operation will succeed Obstruction-free Increase in - Guaranteed to complete an operation if there is no contention throughput Blocking - Operations are serialized Terminology from M. Herlihy [1988, 1990]

  10. Linked List: Details ● Ordered list ● Stores key / data pairs; no duplicate keys ● Operations: Search, Insert and Delete ● Locality Conscious (optimized for cache)

  11. Chunks ... Virtual page

  12. Chunks

  13. Search(key) ● Search for key: 20

  14. Search(key) ● Search for key: 20

  15. Search(key) ● Search for key: 20

  16. Search(key) ● Search for key: 20

  17. Insert(key, data) ● Insert key 18 with data 3

  18. Insert(key, data) ● Insert key 18 with data 3

  19. Insert(key, data) ● Insert key 18 with data 3

  20. Insert(key, data) ● Insert key 18 with data 3

  21. Insert(key, data) ● Insert key 18 with data 3

  22. Insert(key, data) ● Insert key 18 with data 3

  23. Insert(key, data) ● Insert key 18 with data 3

  24. Delete(key) ● Delete key 60

  25. Delete(key) ● Delete key 60

  26. Delete(key) ● Delete key 60

  27. Delete(key) ● Delete key 60

  28. Delete(key) ● Delete key 60

  29. Delete(key) ● Delete key 60

  30. Lock-Free -> Wait-Free ● Can we go from: At least one operation finishing after some finite steps -> any operation is bounded by some finite number of steps? Recipe: ● Contention Counter ● Help Queue ● Modifications to: Search, Insert and Delete

  31. Concept Behind Helping Operation 1 Operation 2 Operation 3

  32. Concept Behind Helping Enqueue: Operation 2 Operation 3 Operation 1

  33. Concept Behind Helping Operation 1 Helping 1 Operation 3

  34. Concept Behind Helping Operation 1 Helping 1 Helping 1

  35. Concept Behind Helping Success Operation 4 Operation 5

  36. Conclusions ● Adoption is on the rise! ● Libraries: ○ Boost ○ Noble (Swedish research group) ○ Amino Concurrent Building Blocks

  37. Bibliography ● Braginsky, Anastasia, and Erez Petrank. "Locality-conscious lock-free linked lists." Distributed Computing and Networking . Springer Berlin Heidelberg, 2011. 107-118. ● Timnat, Shahar, and Erez Petrank. "A Practical Wait-Free Simulation for Lock-Free Data Structures." (2014). ● Herlihy, Maurice. "A methodology for implementing highly concurrent data objects." ACM Transactions on Programming Languages and Systems (TOPLAS) 15.5 (1993): 745-770. ● Valois, John D. "Lock-free linked lists using compare-and-swap." Proceedings of the fourteenth annual ACM symposium on Principles of distributed computing . ACM, 1995. ● Michael, Maged M. "High performance dynamic lock-free hash tables and list-based sets." Proceedings of the fourteenth annual ACM symposium on Parallel algorithms and architectures . ACM, 2002. ● Bender, Michael A., Erik D. Demaine, and Martin Farach-Colton. "Cache-oblivious B-trees." Foundations of Computer Science, 2000. Proceedings. 41st Annual Symposium on . IEEE, 2000. ● Braginsky, Anastasia, and Erez Petrank. "A lock-free b+ tree." Proceedinbgs of the 24th ACM symposium on Parallelism in algorithms and architectures . ACM, 2012. ● Herlihy, Maurice P. "Impossibility and universality results for wait-free synchronization." Proceedings of the seventh annual ACM Symposium on Principles of distributed computing . ACM, 1988. Libraries: http://www.boost.org/doc/libs/1_53_0/doc/html/lockfree.html http://www.noble-library.org/ http://amino-cbbs.sourceforge.net/what-is-cbbs.html

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend