针对不频繁的锁争用,增强了OpenJDK的偏锁

Ting Wang, Michihiro Horie, Kazunori Ogata, Hao Chen Gui, Xiaohong Guo, Yang Liu
{"title":"针对不频繁的锁争用,增强了OpenJDK的偏锁","authors":"Ting Wang, Michihiro Horie, Kazunori Ogata, Hao Chen Gui, Xiaohong Guo, Yang Liu","doi":"10.1145/3397537.3397562","DOIUrl":null,"url":null,"abstract":"Java has a built-in synchronization mechanism and there are many research works to optimize the mechanism by reducing use of costly operations, such as OS monitors and atomic operations. OpenJDK implements biased locking to eliminate all synchronization-related atomic operations for uncontended locks. However, atomic operations are still observed in Hadoop map tasks even though a map task is single-threaded. This paper presents a scenario where a map task causes infrequent lock contentions and an enhancement to help biased locking work better in such situation. Our enhancement includes a new mechanism to profile lock usages, new transitions to enforce those high profiled locks to continue benefit from biased locking, and a mechanism to bypass lock state transition during deoptimization. It accelerated TPC-DS queries execution by 5% on average. We also verified it reduced lock-related atomic operations by up to 50% for map task.","PeriodicalId":373173,"journal":{"name":"Companion Proceedings of the 4th International Conference on Art, Science, and Engineering of Programming","volume":"50 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-03-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Enhancement of OpenJDK biased locking for infrequent lock contention\",\"authors\":\"Ting Wang, Michihiro Horie, Kazunori Ogata, Hao Chen Gui, Xiaohong Guo, Yang Liu\",\"doi\":\"10.1145/3397537.3397562\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Java has a built-in synchronization mechanism and there are many research works to optimize the mechanism by reducing use of costly operations, such as OS monitors and atomic operations. OpenJDK implements biased locking to eliminate all synchronization-related atomic operations for uncontended locks. However, atomic operations are still observed in Hadoop map tasks even though a map task is single-threaded. This paper presents a scenario where a map task causes infrequent lock contentions and an enhancement to help biased locking work better in such situation. Our enhancement includes a new mechanism to profile lock usages, new transitions to enforce those high profiled locks to continue benefit from biased locking, and a mechanism to bypass lock state transition during deoptimization. It accelerated TPC-DS queries execution by 5% on average. We also verified it reduced lock-related atomic operations by up to 50% for map task.\",\"PeriodicalId\":373173,\"journal\":{\"name\":\"Companion Proceedings of the 4th International Conference on Art, Science, and Engineering of Programming\",\"volume\":\"50 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2020-03-23\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Companion Proceedings of the 4th International Conference on Art, Science, and Engineering of Programming\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3397537.3397562\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Companion Proceedings of the 4th International Conference on Art, Science, and Engineering of Programming","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3397537.3397562","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

Java有一个内置的同步机制,有许多研究工作通过减少使用昂贵的操作(如操作系统监视器和原子操作)来优化该机制。OpenJDK实现了偏锁,以消除所有与同步相关的原子操作。然而,在Hadoop地图任务中仍然可以观察到原子操作,即使地图任务是单线程的。本文提出了一个映射任务导致不频繁的锁争用的场景,并提出了一种增强方法来帮助偏锁在这种情况下更好地工作。我们的增强包括一种新的机制来分析锁的使用情况,一种新的转换来强制那些高级锁继续受益于偏置锁,以及一种机制来绕过反优化期间的锁状态转换。它将TPC-DS查询的执行速度平均提高了5%。我们还验证了它将map任务中与锁相关的原子操作减少了50%。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Enhancement of OpenJDK biased locking for infrequent lock contention
Java has a built-in synchronization mechanism and there are many research works to optimize the mechanism by reducing use of costly operations, such as OS monitors and atomic operations. OpenJDK implements biased locking to eliminate all synchronization-related atomic operations for uncontended locks. However, atomic operations are still observed in Hadoop map tasks even though a map task is single-threaded. This paper presents a scenario where a map task causes infrequent lock contentions and an enhancement to help biased locking work better in such situation. Our enhancement includes a new mechanism to profile lock usages, new transitions to enforce those high profiled locks to continue benefit from biased locking, and a mechanism to bypass lock state transition during deoptimization. It accelerated TPC-DS queries execution by 5% on average. We also verified it reduced lock-related atomic operations by up to 50% for map task.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信