首页> 中文期刊> 《电子学报》 >基于硬件 CAS 原语的高效多字无锁同步算法

基于硬件 CAS 原语的高效多字无锁同步算法

         

摘要

Lock-based synchronization may become a performance bottleneck which limits the concurrency in shared -mem-ory machines .In order to solve this problem ,a lock-free synchronization algorithm based on hardware CAS (Compare And Swap ) primitive is proposed in this paper .In the proposed method ,compare and swap instruction provided by underlying processor is used to implement non-blocking synchronization for shared variables in multi-core or multi-thread environment .Global mark value is in-troduced to avoid performance overhead caused by bits reservation of memory word in the traditional design ,and guarantee the con-sistency .Theoretical analysis and experimental results show that the proposed method can efficiently support arbitary multi-word CAS synchronization ,improve the concurrent access performance and provide good scalability .%共享内存体系结构下,为解决锁同步导致的并发性能瓶颈,本文提出了一种基于硬件CAS (比较交换)原语的无锁同步算法。该算法利用底层处理器提供的比较交换指令,实现了在多核多线程环境下对共享变量的非阻塞同步操作,通过采用全局标记值的方式,避免了传统设计中由于使用内存字标记导致的性能开销,同时确保数据在并发访问中的一致性。实验结果表明,本文算法可以高效地支持任意多字的CAS同步,提高了对共享数据的并发访问性能,具有较好的可扩展性。

著录项

相似文献

  • 中文文献
  • 外文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号