Abstract
Data-centric synchronization groups fields of objects into atomic sets to indicate they must 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.
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Abadi, M., Flanagan, C., Freund, S.N.: Types for safe locking: Static race detection for Java. ACM Transactions on Programming Languages and Systems 28(2) (2006)
Boyapati, C., Lee, R., Rinard, M.: Ownership types for safe programming: Preventing data races and deadlocks. In: Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA) (November 2002)
Boyapati, C., Rinard, M.: A parameterized type system for race-free Java programs. In: Conference on Object-Oriented Programming Systems, Languages and Applications OOPSLA (2001)
Ceze, L., von Praun, C., Cascaval, C., Montesinos, P., Torrellas, J.: Concurrency control with data coloring. In: Workshop on Memory Systems Performance and Correctness (MSPC), pp. 6–10 (2008)
Cherem, S., Chilimbi, T., Gulwani, S.: Inferring locks for atomic sections. In: Conference on Programming Language Design and Implementation, PLDI (2008)
Clarke, D., Potter, J., Noble, J.: Ownership types for flexible alias protection. In: Conference on Object-Oriented Programming, Languages, and Applications, OOPSLA (1998)
Flanagan, C., Qadeer, S.: A type and effect system for atomicity. In: Conference on Programming Language Design and Implementation, PLDI (2003)
Flanagan, C., Freund, S.: Type-based race detection for Java. In: Conference on Programming Language Design and Implementation, PLDI (June 2000)
Flanagan, C., Freund, S.N., Lifshin, M., Qadeer, S.: Types for atomicity: Static checking and inference for Java. ACM Transactions on Programming Languages and Systems 30(4) (2008)
Greenhouse, A., Boyland, J.: An object-oriented effects system. In: Guerraoui, R. (ed.) ECOOP 1999. LNCS, vol. 1628, p. 205. Springer, Heidelberg (1999)
Grothoff, C., Palsberg, J., Vitek, J.: Encapsulating objects with confined types. Transactions on Programming Languages and Systems 29(6), 32–73 (2007)
Hammer, C., Dolby, J., Vaziri, M., Tip, F.: Dynamic detection of atomic-set-serializability violations. In: International Conference on Software Engineering, ICSE (2008)
Harris, T., Fraser, K.: Language support for lightweight transactions. In: Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA), pp. 388–402 (November 2003)
Herlihy, M., Moss, J.E.B.: Transactional Memory: Architectural Support for Lock-Free Data Structures. In: International Symposium on Computer Architecture, ISCA (1993)
Hoare, C.A.R.: Monitors: an operating system structuring concept. Communications of the ACM 17(10), 549–557 (1974)
Igarashi, A., Pierce, B.C., Wadler, P.: Featherweight Java: a minimal core calculus for Java and GJ. ACM Transactions on Programming Languages and Systems 23(3), 396–450 (2001)
Kidd, N., Reps, T.W., Dolby, J., Vaziri, M.: Finding concurrency-related bugs using random isolation. In: Jones, N.D., Müller-Olm, M. (eds.) VMCAI 2009. LNCS, vol. 5403, pp. 198–213. Springer, Heidelberg (2009)
Rustan, K., Leino, M.: Data Groups: Specifying the modification of extended state. In: Conference on Object-Oriented Programming Systems, Languages and Applications, OOPSLA (1998)
McCloskey, B., Zhou, F., Gay, D., Brewer, E.: Autolocker: Synchronization inference for atomic sections. In: Symposium on Principles of Programming Languages, POPL (2006)
Noble, J., Potter, J., Vitek, J.: Flexible alias protection. In: Jul, E. (ed.) ECOOP 1998. LNCS, vol. 1445, p. 158. Springer, Heidelberg (1998)
Vaziri, M., Tip, F., Dolby, J.: Associating synchronization constraints with data in an object-oriented language. In: Symposium on Principles of Programming Languages, POPL (2006)
Vitek, J., Bokowski, B.: Confined types in Java. Software Practice & Experience 31(6), 507–532 (2001)
Wang, L., Stoller, S.D.: Accurate and efficient runtime detection of atomicity errors in concurrent programs. In: Symposium on Principles and Practice of Parallel Programming, PPoPP (2006)
Wang, L., Stoller, S.D.: Runtime analysis of atomicity for multithreaded programs. IEEE Transactions on Software Engineering 32(2) (2006)
Wrigstad, T., Pizlo, F., Meawad, F., Zhao, L., Vitek, J.: Loci: Simple thread-locality for Java. In: Drossopoulou, S. (ed.) ECOOP 2009 – Object-Oriented Programming. LNCS, vol. 5653, pp. 445–469. Springer, Heidelberg (2009)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Vaziri, M., Tip, F., Dolby, J., Hammer, C., Vitek, J. (2010). A Type System for Data-Centric Synchronization. In: D’Hondt, T. (eds) ECOOP 2010 – Object-Oriented Programming. ECOOP 2010. Lecture Notes in Computer Science, vol 6183. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-14107-2_15
Download citation
DOI: https://doi.org/10.1007/978-3-642-14107-2_15
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-14106-5
Online ISBN: 978-3-642-14107-2
eBook Packages: Computer ScienceComputer Science (R0)