期刊文献+

一种检测竞争并自调节的动态读写锁 被引量:2

Dynamic Reader-writer Lock Based on Contention Detection and Self-adjustment
下载PDF
导出
摘要 传统的同步机制设计限制了多核平台上多线程应用的可扩展性,其中被广泛使用的读写锁问题特别突出.目前的读写锁研究大多偏向读多写少的场景,其方法是尽量提高读者执行的效率,将开销转移到写者执行的过程中.然而写者的执行过程会使得临界区进入互斥状态,此时只允许一个线程在临界区中执行,所以大量的写者执行开销会降低多线程应用程序的性能.本文通过研究读者与写者加锁特点,提出一种动态读写锁.动态读写锁通过检测读者加锁时竞争情况,循序渐进地提高读者执行的可扩展性,避免给写者执行增加无意义的开销.测试结果表明,动态读写锁在50%至99%读比例下表现出极好的性能,并且能对内存键值系统带来较为全面的性能提升. Common design of synchronization mechanisms limits the scalability of multi-threaded applications on multi-core platforms, especially reader-writer locks. Recent researches on reader-writer locks mainly focus on how to move the lock acquisition overhead from read side to write side to achieve better performance in read-mostly scenarios. However, writers' execution blocks any other thread from entering critical sections, which may cause performance degradation if the overhead is too high. To solve this problem, we propose a novel reader-writer lock called dynamic reader-writer lock (dynamicRWLock). DynamicRWLock increases the concurrency of read lock acquisitions when contention is high, and reduces the overhead of write lock acquisitions when contention is low. The e- valuation results demonstrate that dynamicRWLock achieves better performance both in a micro-benchmark and in an in-memory data- base benchmark.
作者 张恒 陈海波
出处 《小型微型计算机系统》 CSCD 北大核心 2016年第9期1904-1909,共6页 Journal of Chinese Computer Systems
基金 教育部新世纪优秀人才支持计划项目(ZXZY037003)资助 上海市科技成果转化和产业化项目(14511100902)资助
关键词 动态读写锁 可扩展性 读写比例 多核 dynamic reader-writer locks scalability read ratio multi-core
  • 相关文献

参考文献3

二级参考文献10

共引文献2

同被引文献10

引证文献2

二级引证文献2

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部