【24h】

Lock Reservation: Java Locks Can Mostly Do Without Atomic Operations

机译:锁保留:Java锁几乎可以不执行原子操作

获取原文
获取原文并翻译 | 示例

摘要

Because of the built-in support for multi-threaded programming, Java programs perform many lock operations. Although the overhead has been significantly reduced in the recent virtual machines, one or more atomic operations are required for acquiring and releasing an object's lock even in the fastest cases. This paper presents a novel algorithm called lock reservation. It exploits thread locality of Java locks, which claims that the locking sequence of a Java lock contains a very long repetition of a specific thread. The algorithm allows locks to be reserved for threads. When a thread attempts to acquire a lock, it can do without any atomic operation if the lock is reserved for the thread. Otherwise, it cancels the reservation and falls back to a conventional locking algorithm. We have evaluated an implementation of lock reservation in IBM's production virtual machine and compiler. The results show that it achieved performance improvements up to 53% in real Java programs.
机译:由于对多线程编程的内置支持,Java程序执行许多锁定操作。尽管在最近的虚拟机中开销已大大减少,但是即使在最快的情况下,也需要一个或多个原子操作来获取和释放对象的锁。本文提出了一种称为锁保留的新颖算法。它利用Java锁的线程局部性,该Java锁声称Java锁的锁定序列包含特定线程的非常长的重复。该算法允许为线程保留锁。当线程尝试获取锁时,如果锁是为线程保留的,则可以执行任何原子操作。否则,它将取消保留,并退回到传统的锁定算法。我们评估了IBM生产虚拟机和编译器中锁保留的实现。结果表明,在实际的Java程序中,它的性能提高了53%。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号