Deterministic parallel execution of native threads
Nobody has claimed this yet.
- Dominant language
- Markdown
- Stars
- 6.6k
- Forks
- 1.7k
- Avg merge
- 16h 14m
- Merged PRs (30d)
- 1
Description
Bergan, Anderson, Devietti, Ceze & Grossman. (2010). CoreDet: a compiler and runtime system for deterministic multithreaded execution. ACM SIGARCH Computer Architecture News 38(1), pp. 53-64.
The applications include:
- Deterministic execution during debugging
- Manipulating thread scheduling to uncover concurrency bugs. This would be very powerful combined with coverage-based adaptive fuzzing.
The system described in the paper uses alternating stages of parallel and serial execution, each bounded in time. In the simplest execution model, inter-thread communication blocks until serial mode. They also describe how to optimize this using approaches similar to cache coherence.
Their implementation uses an LLVM pass to instrument each access to possibly-shared memory. In Rust it should suffice to instrument std::sync::atomic or the equivalent LLVM intrinsics. From §7.3:
for data race free programs, deterministic synchronization is sufficient for full determinism
The LLVM pass injects other code to handle calls to external libraries (which may have uninstrumented data races), and to provide deterministic, bounded time quanta during execution. rr uses hardware performance counters for the latter purpose, which would be an interesting variation to explore.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository files, tests, or entry points are named. Start by reading the linked CoreDet paper and use its execution model and instrumentation approach to define a concrete, implementable scope for Rust native-thread determinism; done means a focused proposal with clear boundaries and expected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100