作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2013, Vol. 39 ›› Issue (8): 31-37. doi: 10.3969/j.issn.1000-3428.2013.08.007

• 专栏 • 上一篇    下一篇

并发非阻塞自组织链表算法

陈春光a,张坤龙b,谭龙飞b,韩 昭b   

  1. (天津大学 a. 软件学院;b. 计算机科学与技术学院,天津 300072)
  • 收稿日期:2012-09-19 出版日期:2013-08-15 发布日期:2013-08-13
  • 作者简介:陈春光(1986-),男,硕士研究生、CCF会员,主研方向:并发数据结构,数据库技术;张坤龙,副教授、博士;谭龙飞、韩 昭,硕士研究生
  • 基金资助:

    国家自然科学基金资助项目(10978016)

Concurrent Non-blocking Self-organizing Linked List Algorithm

CHEN Chun-guang a, ZHANG Kun-long b, TAN Long-fei b, HAN Zhao b   

  1. (a. School of Computer Software; b. School of Computer Science and Technology, Tianjin University, Tianjin 300072, China)
  • Received:2012-09-19 Online:2013-08-15 Published:2013-08-13

摘要:

利用自组织链表处理局部性较强的请求可提高性能,而非阻塞算法则能保证健壮性和可靠性。基于此,提出一种并发非阻塞自组织链表算法。使用MTF并发规则进行自组织操作,采用同步原语CAS实现并发程序,以保证查找、插入和删除操作的可线性化。实验结果表明,与Heller、Harris算法相比,随着读操作比例增大、链表变长,该算法的性能得到迅速改善。当读操作比例为90%、键值范围为4 096时,其消耗时间最少。

关键词: 并发, 非阻塞, 自组织, 链表, 可线性化, 互斥

Abstract:

Self-organizing linked lists perform well for handling requests with strong locality. Non-blocking algorithm can provide better robust and reliable. It uses MTF(Move-to-Front) concurrent rule to do concurrent operation, and presents the non-blocking self-organizing linked list algorithm which supports linearizable search, insert and remove operations using CAS primitive. Experimental results show that this algorithm performs well for long linked lists with high percentages of search operations. With the data sequence in experiment, when the percentage of lookup reaches 90% and the data range becomes 4 096, it provides the best performance.

Key words: concurrent, non-blocking, self-organizing, linked list, linearizability, mutex

中图分类号: