Formal reasoning about lazy-STM programs

Transactional memory (TM) is an easy-using parallel programming model that avoids common problems associated with conventional locking techniques. Several researchers have proposed a large amount of alternative hardware and software TM implementations. However, few ones focus on formal reasoning about these TM programs. In this paper, we propose a framework at assembly level for reasoning about lazy software transactional memory (STM) programs. First, we give a software TM implementation based on lightweight locks. These locks are also one part of the shared memory. Then we define the semantics of the model operationally, and the lightweight locks in transaction are non-blocking, avoiding deadlocks among transactions. Finally we design a logic -- a combination of permission accounting in separation logic and concurrent separation logic -- to verify various properties of concurrent programs based on this machine model. The whole framework is formalized using a proof-carrying-code (PCC) framework.

[1]  Dan Grossman,et al.  High-level small-step operational semantics for transactions , 2008, POPL '08.

[2]  Kunle Olukotun,et al.  Transactional memory coherence and consistency , 2004, Proceedings. 31st Annual International Symposium on Computer Architecture, 2004..

[3]  Bradley C. Kuszmaul,et al.  Unbounded transactional memory , 2005, 11th International Symposium on High-Performance Computer Architecture.

[4]  Kevin E. Moore,et al.  Log-based transactional memory , 2007 .

[5]  Maurice Herlihy,et al.  Software transactional memory for dynamic-sized data structures , 2003, PODC '03.

[6]  Cliff B. Jones,et al.  Tentative steps toward a development method for interfering programs , 1983, TOPL.

[7]  ShaoZhong,et al.  Verification of safety properties for concurrent assembly code , 2004 .

[8]  Nir Shavit,et al.  Software transactional memory , 1995, PODC '95.

[9]  Bratin Saha,et al.  McRT-STM: a high performance software transactional memory system for a multi-core runtime , 2006, PPoPP '06.

[10]  Matthias Felleisen,et al.  A Syntactic Approach to Type Soundness , 1994, Inf. Comput..

[11]  Xinyu Feng,et al.  Modular verification of assembly code with stack-based control abstractions , 2006, PLDI '06.

[12]  Yu Zhang,et al.  On the Verification of Strong Atomicity in Programs Using STM , 2009, 2009 Third IEEE International Conference on Secure Software Integration and Reliability Improvement.

[13]  Peter W. O'Hearn,et al.  Resources, concurrency, and local reasoning , 2007 .

[14]  Christopher J. Hughes,et al.  Hybrid transactional memory , 2006, PPoPP '06.

[15]  Maurice Herlihy,et al.  Transactional Memory: Architectural Support For Lock-free Data Structures , 1993, Proceedings of the 20th Annual International Symposium on Computer Architecture.

[16]  Stephen Brookes A Grainless Semantics for Parallel Programs with Shared Mutable Data , 2005, MFPS.

[17]  Yu Zhang,et al.  Certifying Concurrent Programs Using Transactional Memory , 2009, Journal of Computer Science and Technology.

[18]  Torvald Riegel,et al.  Dynamic performance tuning of word-based software transactional memory , 2008, PPoPP.

[19]  ParkinsonMatthew,et al.  Permission accounting in separation logic , 2005 .

[20]  John C. Reynolds,et al.  Separation logic: a logic for shared mutable data structures , 2002, Proceedings 17th Annual IEEE Symposium on Logic in Computer Science.

[21]  Milo M. K. Martin,et al.  Subtleties of transactional memory atomicity semantics , 2006, IEEE Computer Architecture Letters.

[22]  Zhong Shao,et al.  Verification of safety properties for concurrent assembly code , 2004, ICFP '04.

[23]  Xinyu Feng,et al.  Modular verification of concurrent assembly code with dynamic thread creation and termination , 2005, ICFP '05.

[24]  Nir Shavit,et al.  Transactional Locking II , 2006, DISC.

[25]  Peter W. O'Hearn,et al.  Permission accounting in separation logic , 2005, POPL '05.