A Type System for Data-Centric Synchronization

Data-centric synchronization groups fields of objects into atomic sets to indicate theymust be updated atomically. Each atomic set has associated units of work, code fragments that preserve the consistency of that atomic set.We present a type system for data-centric synchronization that enables separate compilation and supports atomic sets that span multiple objects, thus allowing recursive data structures to be updated atomically. The type system supports full encapsulation for more efficient code generation. We evaluate our proposal using AJ, which extends the Java programming language with data-centric synchronization. We report on the implementation of a compiler and on refactoring classes from standard libraries and a multi-threaded benchmark to use atomic sets. Our results suggest that data-centric synchronization enjoys low annotation overhead while preventing high-level data races.

[1]  Martin Odersky,et al.  A Statically Safe Alternative to Virtual Types , 1998, ECOOP.

[2]  Jan Vitek,et al.  Flexible Alias Protection , 1998, ECOOP.

[3]  Jan Vitek,et al.  Loci: Simple Thread-Locality for Java , 2009, ECOOP.

[4]  C. A. R. Hoare,et al.  Monitors: an operating system structuring concept , 1974, CACM.

[5]  Martín Abadi,et al.  Types for safe locking: Static race detection for Java , 2006, TOPL.

[6]  Sophia Drossopoulou,et al.  Ownership, encapsulation and the disjointness of type and effect , 2002, OOPSLA '02.

[7]  Kousha Etessami,et al.  Analysis of Recursive Game Graphs Using Data Flow Equations , 2004, VMCAI.

[8]  Stephen N. Freund,et al.  Type-based race detection for Java , 2000, PLDI '00.

[9]  Josep Torrellas,et al.  Concurrency control with data coloring , 2008, MSPC '08.

[10]  Scott D. Stoller,et al.  Runtime analysis of atomicity for multithreaded programs , 2006, IEEE Transactions on Software Engineering.

[11]  Martin C. Rinard,et al.  A parameterized type system for race-free Java programs , 2001, OOPSLA '01.

[12]  Philip Wadler,et al.  Featherweight Java: a minimal core calculus for Java and GJ , 2001, TOPL.

[13]  Cormac Flanagan,et al.  A type and effect system for atomicity , 2003, PLDI.

[14]  Jan Vitek,et al.  Confined types , 1999, OOPSLA '99.

[15]  Rachid Guerraoui,et al.  ECOOP’ 99 — Object-Oriented Programming , 1999, Lecture Notes in Computer Science.

[16]  Aaron Greenhouse,et al.  An Object-Oriented Effects System , 1999, ECOOP.

[17]  Scott D. Stoller,et al.  Accurate and efficient runtime detection of atomicity errors in concurrent programs , 2006, PPoPP '06.

[18]  Sophia Drossopoulou ECOOP 2009 - Object-Oriented Programming, 23rd European Conference, Genoa, Italy, July 6-10, 2009. Proceedings , 2009, ECOOP.

[19]  David Gay,et al.  Autolocker: synchronization inference for atomic sections , 2006, POPL '06.

[20]  Sumit Gulwani,et al.  Inferring locks for atomic sections , 2008, PLDI '08.

[21]  Julian Dolby,et al.  Finding concurrency-related bugs using random isolation , 2008, International Journal on Software Tools for Technology Transfer.

[22]  Martin C. Rinard,et al.  ACM Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), November 2002 Ownership Types for Safe Programming: Preventing Data Races and Deadlocks , 2022 .

[23]  Frank Tip,et al.  Associating synchronization constraints with data in an object-oriented language , 2006, POPL '06.

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

[25]  Stephen N. Freund,et al.  Types for atomicity: Static checking and inference for Java , 2008, TOPL.

[26]  Martín Abadi,et al.  Types for Safe Locking , 1999, ESOP.

[27]  Jens Palsberg,et al.  Encapsulating objects with confined types , 2001, TOPL.

[28]  Jan Vitek,et al.  Confined types in Java , 2001, Softw. Pract. Exp..

[29]  K. Rustan M. Leino,et al.  Data groups: specifying the modification of extended state , 1998, OOPSLA '98.

[30]  Frank Tip,et al.  Dynamic detection of atomic-set-serializability violations , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[31]  James Noble,et al.  Ownership types for flexible alias protection , 1998, OOPSLA '98.

[32]  Keir Fraser,et al.  Language support for lightweight transactions , 2003, SIGP.