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

06/03/2021
by   Zhizhou Zhang, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/24/2017

From Concurrent Programs to Simulating Sequential Programs: Correctness of a Transformation

Frama-C is a software analysis framework that provides a common infrastr...
research
07/26/2020

IdSan: An identity-based memory sanitizer for fuzzing binaries

Most memory sanitizers work by instrumenting the program at compile time...
research
01/22/2020

Automatically Harnessing Sparse Acceleration

Sparse linear algebra is central to many scientific programs, yet compil...
research
08/17/2020

CROW: Code Diversification for WebAssembly

The adoption of WebAssembly has rapidly increased in the last few years ...
research
09/10/2023

SYSPART: Automated Temporal System Call Filtering for Binaries

Restricting the system calls available to applications reduces the attac...
research
08/13/2019

Type-Directed Program Synthesis and Constraint Generation for Accelerator Library Portability

Fast numerical libraries have been a cornerstone of scientific computing...
research
05/02/2019

Real Differences between OT and CRDT in Building Co-Editing Systems and Real World Applications

OT (Operational Transformation) was invented for supporting real-time co...

Please sign up or login with your details

Forgot password? Click here to reset