摘要
在共享存储器的多核环境中,锁住共享资源是完成同步操作的有效方法之一.为了提高同步对象工作效率,借鉴windows同步对象工作原理,利用windows原子操作的不可分割性和高效性,提出了一种用户级轻量级自旋锁(CSpinLock)算法,该算法具有执行速度快的特点.在实验中,将该算法与windows同步对象分别实施于射线跟踪程序.理论分析与实验结果表明,在基于windows系统的共享存储多核环境中和在同步操作频繁的情况下,采用用户级轻量级自旋锁的程序性能较windows同步对象有明显的提升.
In the multi-core processor environment of public storage, locking the public storage is an effective way of accomplishing synchronous operation. In order to improve the efficiency of the synchronization object, taking examples from the operational principle of the "windows synchronization object" and using the inalienability and high efficacy of windows atomic operation, a novel light user-level spin-lock named "CSpinLock" is proposed. This kind of algorithm is characterized by fast processing. In an experiment, this algorithm, together with windows synchronization object, was implemented in the ray-tracing program. Theoretical analysis and the experimental result showed that under the circumstance of the multicore processor environment of public storage and frequent synchronous operations, the performance of programs using CSpinLock was obviously better than that of the "windows synchronization object".
出处
《西南大学学报(自然科学版)》
CAS
CSCD
北大核心
2011年第5期161-165,共5页
Journal of Southwest University(Natural Science Edition)
基金
国家"863"高技术研究发展计划(2007AA12Z226)
关键词
多核
同步
自旋锁
用户级
原子操作
射线跟踪
multi-core
synchronous
spin-lock
user-level
atomic operation
ray-tracing