一种用于并行系统的非阻塞消息队列机制
收稿日期: 2009-06-04
修回日期: 2009-11-05
网络出版日期: 2011-04-25
基金资助
国家863计划资助项目(2008AA01Z138,2007AA01Z177)
A NonBlocking List Mechanism for Event Message Communications
Received date: 2009-06-04
Revised date: 2009-11-05
Online published: 2011-04-25
并行线程之间的消息传递和同步机制与系统的并行性能密切相关。在并行系统中,人们期望不必要的同步尽可能少,以充分开发系统的并行性,提高系统的运行效率。非阻塞缓冲区机制(NBB)允许消息生产者和消费者在不使用同步机制的情况下实现消息传递。但是,NBB机制存在着消息缓冲区有限、在多生产者和/或多消费者情况下使用不便、有时甚至功能不能满足要求等问题。本文介绍的非阻塞队列机制(NBL)可看作是NBB的链表实现,但NBL可以有效地避免NBB的上述缺陷。本文描述了相关算法及其正确性证明。最后讨论了NBL机制的使用方法,并进行了有效性和性能评测。
刘晓建,吴庆波,戴华东,任怡 . 一种用于并行系统的非阻塞消息队列机制[J]. 计算机工程与科学, 2011 , 33(4) : 75 -80 . DOI: 10.3969/j.issn.1007130X.2011.
It is desirable to facilitate data communications among parallel computation threads without incurring nonessential synchronizations in parallel computing systems. The NonBlocking Buffer(NBB) is such a mechanism. However, the NBB mechanism has several severe drawbacks, including limited buffer size, inconvenient or even infeasible usage in multiple consumers/producers cases. Nonblocking List mechanism(NBL), which can handle these problems gracefully, is described in this article. The algorithms and formal proofs are also presented. Finally, experiments are done to test the validity and performance of the NBL mechanism. The NBL mechanism can be regarded as the linked list version of NBB.
/
| 〈 |
|
〉 |