|
The shift from single to multiple core
architectures means that, in order to increase application performance,
programmers must write concurrent, multithreaded programs.
Unfortunately, multithreaded applications are susceptible to numerous
errors, including deadlocks, race conditions, atomicity violations, and
order violations.These errors are notoriously difficult for programmers
to debug.We present Grace, a runtime system for
multithreaded programs written in C/C++ that provides good scalability
and performance while eliminating a range of concurrency errors. With
Grace, multithreaded programs behave as if all threads were run
sequentially. Grace exploits available CPU resources by combining
speculative thread execution, supported by a novel virtual memory based
transactional memory system, together with a sequential commit protocol
that guarantees sequential semantics. We show that Grace ensures the
correctness of otherwise-buggy multithreaded programs. Across a suite of
CPU-intensive multithreaded applications, Grace often achieves
performance and scalability comparable to unsafe thread libraries |