作者: Tom Bergan , Owen Anderson , Joseph Devietti , Luis Ceze , Dan Grossman
关键词:
摘要: The behavior of a multithreaded program does not depend only on its inputs. Scheduling, memory reordering, timing, and low-level hardware effects all introduce nondeterminism in the execution programs. This severely complicates many tasks, including debugging, testing, automatic replication. In this work, we avoid these complications by eliminating their root cause: develop compiler runtime system that runs arbitrary C/C++ POSIX Threads programs deterministically. A trivial non-performant approach to providing determinism is simply deterministically serializing execution. Instead, present infrastructure ensures but resorts serialization rarely, for handling interthread communication synchronization. We two basic approaches, both which are largely dynamic with performance improved some static optimizations. First, an ownership-based detects via evolving table tracks ownership regions threads. Second, buffering uses versioned employs deterministic commit protocol make changes visible other While has larger single-threaded overhead than ownership, it tends scale better (serializing less often). hybrid sometimes performs scales either individually. Our implementation based LLVM infrastructure. It needs neither programmer annotations nor special hardware. empirical evaluation PARSEC SPLASH2 benchmarks shows our comparably nondeterministic