Sciweavers

Share
SIGSOFT
2009
ACM

Refactoring for reentrancy

10 years 6 months ago
Refactoring for reentrancy
A program is reentrant if distinct executions of that program on distinct inputs cannot affect each other. Reentrant programs have the desirable property that they can be deployed on parallel machines without additional concurrency control. Many existing Java programs are not reentrant because they rely on mutable global state. We present a mostly-automated refactoring that makes such programs reentrant by replacing global state with thread-local state and performing each execution in a fresh thread. The approach has the key advantage of yielding a program that is obviously safe for parallel execution; the program can then be optimized selectively for better performance. We implemented this refactoring in Reentrancer, a practical Eclipsebased tool. Reentrancer successfully eliminated observed reentrancy problems in five single-threaded Java benchmarks. For three of the benchmarks, Reentrancer enabled speedups on a multicore machine without any further code modification. Categories and...
Jan Wloka, Manu Sridharan, Frank Tip
Added 19 Nov 2009
Updated 19 Nov 2009
Type Conference
Year 2009
Where SIGSOFT
Authors Jan Wloka, Manu Sridharan, Frank Tip
Comments (0)
books