Safe Fine-Grained Locking for Aggregate Objects

Programmers have difficulty writing correct multithreaded code, not to mention code that scales well. One way to approach this problem is by offering a transaction construct, and leaving it to the compiler and run-time system to implement efficient synchronization. However, automatically generating efficient synchronization code is an open research problem. In this paper, rather than attempting to generate synchronization code automatically, we propose a programming methodology for explicit fine-grained locking of aggregate objects. We also propose a method for run-time checking, and a method for sound modular static verification of the safety of programs written according to the methodology. The system prevents deadlocks. The system is an extension of our methodology for safe concurrency for aggregate objects with invariants, which is in turn based on the Spec#/Boogie methodology for aggregate objects with invariants. This paper is a preliminary result of our investigation into programming methodologies for safe and efficient concurrency in object-oriented languages. Safe Fine-Grained Locking for Aggregate Objects Bart Jacobs Frank Piessens Wolfram Schulte Dept. CS, K.U.Leuven, Belgium {bartj,frank}@cs.kuleuven.be Microsoft Research, Redmond, USA schulte@microsoft.com

[1]  Frank Piessens,et al.  Safe concurrency for aggregate objects with invariants , 2005, Third IEEE International Conference on Software Engineering and Formal Methods (SEFM'05).

[2]  Simon L. Peyton Jones,et al.  Composable memory transactions , 2005, CACM.