A Practical Analysis of Rust's Concurrency Story
Aditya Saligrama, Andrew Shen, Jon Gjengset

TL;DR
This paper analyzes Rust's approach to concurrency, focusing on its compile-time data race detection and its impact on developing high-performance, lock-free concurrent data structures like hashmaps.
Contribution
It provides a detailed case study of implementing a lock-free hashmap in Rust, illustrating how Rust's type system influences concurrent programming practices.
Findings
Rust's type system effectively prevents data races at compile time.
The implemented hashmap is among the fastest concurrent hashmaps in Rust.
Rust's concurrency model helps mitigate bottlenecks in multi-threaded applications.
Abstract
Correct concurrent programs are difficult to write; when multiple threads mutate shared data, they may lose writes, corrupt data, or produce erratic program behavior. While many of the data-race issues with concurrency can be avoided by the placing of locks throughout the code, these often serialize program execution, and can significantly slow down performance-critical applications. Programmers also make mistakes, and often forget locks in less-executed code paths, which leads to programs that misbehave only in rare situations. Rust is a recent programming language from Mozilla that attempts to solve these intertwined issues by detecting data-races at compile time. Rust's type system encodes a data-structure's ability to be shared between threads in the type system, which in turn allows the compiler to reject programs where threads directly mutate shared state without locks or other…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsDistributed systems and fault tolerance · Parallel Computing and Optimization Techniques · Logic, programming, and type systems
