arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2106.01710cs.DCcs.PFcs.PL
收藏

面向真实世界Go程序的乐观并发控制(扩展版附附录)

Optimistic Concurrency Control for Real-world Go Programs (Extended Version with Appendix)

Zhizhou Zhang, Milind Chabbi, Adam Welc, Timothy Sherwood

摘要:

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

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑