Optimistic Concurrency Control for Real-world Go Programs
summary
Gocc is a source-to-source transformer that replaces mutex-protected regions in Go with Hardware Transactional Memory using inter-procedural AST analysis to detect lock/unlock pairs, handle defer and nested locks, and reject HTM-unfriendly ops like IO. A runtime uses a lightweight hash-based perceptron-driven HTM controller to switch between HTM and locks. Evaluation on Intel RTM (8 cores/16 threads) across popular Go libraries shows up to 10x speedups on contention-light sections and negligible single-core slowdown while avoiding regressions on high-conflict workloads.
AI-written summary · about
chapters (13)
- 0:00Intro
- 0:33Golang and Concurrency
- 1:25Mutex Lock → Pessimistic Concurrency Control
- 2:14Optimism with Transactional Memory
- 2:53Hardware Transactional Memory (HTM)
- 4:44Our Solution: GOCC
- 6:34Implementation Challenges of GOCC
- 8:07GOCC Lock Identification
- 8:46GOCC Runtime Contention Management
- 9:42Evaluation
- 10:17Benchmark 1: Tally
- 10:38Benchmark 2: Concurrent set
- 11:28Conclusions
related talks
44mConcurrency in Go: from hardware to code ☠️
01h 33mWhy You Should Use Software Transactional Memory
01h 00mWhat did C++ do for Transactional Memory?
01h 01mUnderstanding Hardware Transactional Memory
44mConcurrency in Go: From Hardware to Code ☠️
24mMastering Concurrency in Go: From Patterns to Production
15mHTMFS: Strong Consistency Comes for Free with Hardware Transactional Memory...
01h 13mConcurrency Hylomorphism
