Automatic Synchronization Correction

Cormac Flanagan, Freund, Stephen N. · UR Research (University of Rochester)

Multithreaded programs are notoriously prone to synchronization errors. Much prior work has tackled the problem of detecting such errors. This paper focuses on the subsequent problem of synchronization correction. We present a constraint-based analysis that, given an erroneous program, automatically infers (where possible) what additional locking operations should be inserted in order to yield a correctly-synchronized program. For performance reasons, our algorithm also attempts to minimize the number of additional lock acquires and the duration for which the acquired locks are held. We present experimental results that validate this approach on a number of standard Java library classes.

Read the paper · More papers on PaperTik