【24h】

Lock Elision for Read-Only Critical Sections in Java

机译:锁定java中的只读关键部分

获取原文

摘要

It is not uncommon in parallel workloads to encounter shared data structures with read-mostly access patterns, where operations that update data are infrequent and most operations are read-only. Typically, data consistency is guaranteed using mutual exclusion or read-write locks. The cost of atomic update of lock variables result in high overheads and high cache coherence traffic under active sharing, thus slowing down single thread performance and limiting scalability. In this paper, we present SOLERO (Software Optimistic Lock Elision for Read-Only critical sections), a new lock implementation called for optimizing read-only critical sections in Java based on sequential locks. SOLERO is compatible with the conventional lock implementation of Java. However, unlike the conventional implementation, only critical sections that may write data or have side effects need to update lock variables, while read-only critical sections need only read lock variables without writing them. Each writing critical section changes the lock value to a new value. Hence, a read-only critical section is guaranteed to be consistent if the lock is free and its value does not change from the beginning to the end of the read-only critical section. Using Java workloads including SPECjbb2005 and the HashMap and TreeMap Java classes, we evaluate the performance impact of applying SOLERO to read-mostly locks. Our experimental results show performance improvements across the board, often substantial, in both single thread speed and scalability over the conventional lock implementation (mutual exclusion) and read-write locks. SOLERO improves the performance of SPECjbb2005 by 3-5% on single and multiple threads. The results using the HashMap and TreeMap benchmarks show that SOLERO outperforms the conventional lock implementation and read-write locks by substantial multiples on multi-threads.
机译:在并行工作负载中遇到具有读取大多数访问模式的共享数据结构并不罕见,其中更新数据不常见并且大多数操作是只读的操作。通常,使用相互排除或读写锁保证数据一致性。锁定变量的原子更新成本导致在主动共享下的高高度和高高高速缓存相干流量,从而减速单线性能和限制可扩展性。在本文中,我们呈现SOLERO(软件乐观锁定ELISION用于只读关键部分),一种新的锁定实现,要求基于顺序锁优化Java中的只读关键部分。 SOLERO与Java的传统锁实现兼容。但是,与传统实现不同,只有可能编写数据或具有副作用的关键部分需要更新锁定变量,而只读关键部分则仅需要读取锁定变量而不写入它们。每个写入关键部分将锁定值更改为新值。因此,如果锁定是空闲的,则保证只读关键部分是一致的,并且其值不会从只读关键部分的开始到结束。使用包括SpecJBB2005和HashMap和Treemap Java类别的Java工作负载,我们评估应用SOLERO读取大多数锁的性能影响。我们的实验结果表明,在传统锁定实现(相互排除)和读写锁上的单螺纹速度和可扩展性的单螺纹速度和可扩展性方面都显示出性能改进。 SOLERO在单线和多个线程上提高了SPECJBB2005的性能3-5%。使用HashMap和Treemap基准测试的结果表明SOLERO在多线程上通过大量倍数优于传统的锁定实现和读写锁。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号