当前位置: X-MOL 学术arXiv.cs.PL › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Optimistic Concurrency Control for Real-world Go Programs (Extended Version with Appendix)
arXiv - CS - Programming Languages Pub Date : 2021-06-03 , DOI: arxiv-2106.01710
Zhizhou Zhang, Milind Chabbi, Adam Welc, Timothy Sherwood

We present a source-to-source transformation framework, GOCC, that consumes lock-based pessimistic concurrency programs in the Go language and transforms them into optimistic concurrency programs that use Hardware Transactional Memory (HTM). The choice of the Go language is motivated by the fact that concurrency is a first-class citizen in Go, and it is widely used in Go programs. GOCC performs rich inter-procedural program analysis to detect and filter lock-protected regions and performs AST-level code transformation of the surrounding locks when profitable. Profitability is driven by both static analyses of critical sections and dynamic analysis via execution profiles. A custom HTM library, using perceptron, learns concurrency behavior and dynamically decides whether to use HTM in the rewritten lock/unlock points. Given the rich history of transactional memory research but its lack of adoption in any industrial setting, we believe this workflow, which ultimately produces source-code patches, is more apt for industry-scale adoption. Results on widely adopted Go libraries and applications demonstrate significant (up to 10x) and scalable performance gains resulting from our automated transformation while avoiding major performance regressions.

中文翻译:

现实世界围棋程序的乐观并发控制(扩展版附附录)

我们提出了一个源到源转换框架 GOCC,它使用 Go 语言中基于锁的悲观并发程序,并将它们转换为使用硬件事务内存 (HTM) 的乐观并发程序。选择 Go 语言的动机是并发是 Go 中的一等公民,并且它在 Go 程序中被广泛使用。GOCC 执行丰富的过程间程序分析来检测和过滤锁保护区域,并在有利可图时对周围的锁执行 AST 级代码转换。盈利能力由关键部分的静态分析和通过执行配置文件的动态分析驱动。使用感知器的自定义 HTM 库学习并发行为并动态决定是否在重写的锁定/解锁点中使用 HTM。鉴于事务内存研究的丰富历史,但它在任何工业环境中都缺乏采用,我们相信这种最终产生源代码补丁的工作流程更适合行业规模的采用。广泛采用的 Go 库和应用程序的结果表明,我们的自动化转换带来了显着(高达 10 倍)和可扩展的性能提升,同时避免了重大的性能回归。
更新日期:2021-06-04
down
wechat
bug