How to implement lock-free skip list

妖精的绣舞 提交于 2019-12-04 07:35:40

问题


I need to implement a lock-free skip list. I tried to look for papers. Unfortunatly all I found was lock-free single linked lists (in many flavors). However how to implement lock-free skip list?


回答1:


Lock-free skip lists are described in the book The Art of Multiprocessor Programming, and the technical report Practical lock-freedom, which is based on a PhD thesis on the subject. The skip list discussion begins on page 53. An example implementation, based on these sources, is included in this google code project.

There are related discussions, links to literature and implementations (not necessarily lock-free) in the SO questions Skip List vs. Binary Tree, and Skip Lists - ever used them?.




回答2:


This paper presents a lock-free and wait-free skip list. It's straightforward to implement - I implemented this a few weeks ago as part of the Intel Threading Challenge 2010 (see the SkipList tab halfway down the page.)

Java includes an implementation of a concurrent skip list, java.util.concurrent.ConcurrentSkipListMap.



来源:https://stackoverflow.com/questions/3479043/how-to-implement-lock-free-skip-list

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!