Skip to main content

Thread Safety through Partitions and Effect Agreements

  • Conference paper
Languages and Compilers for Parallel Computing (LCPC 2008)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 5335))

Abstract

This paper describes a safety analysis for a multithreaded system based upon transactional memory. The analysis guarantees that shared data is always read and written from within a transaction, while allowing for unsynchronized access to thread-local and (shared) read-only data, as well as the migration of data between threads. The analysis is based on a type and effect system for object-oriented programs called partitions. Programmers specify a partitioning of the heap into disjoint regions at a field-level granularity, and then use this partitioning to enforce safety properties in their programs. Our flow-sensitive effect system requires methods to disclose which partitions of the heap they will read or write, and also allows them to specify an effect agreement which can be used to limit the conditions in which a method can be called.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Herlihy, M., Moss, J.E.B.: Transactional memory: architectural support for lock-free data structures. SIGARCH Comput. Archit. News 21, 289–300 (1993)

    Article  Google Scholar 

  2. Harris, T., Fraser, K.: Language support for lightweight transactions. SIGPLAN Not. 38, 388–402 (2003)

    Article  Google Scholar 

  3. Bull, J.M., Kambites, M.E.: JOMP–an OpenMP-like interface for Java. In: JAVA, pp. 44–53. ACM, New York (2000)

    Google Scholar 

  4. Lea, D.: A Java fork/join framework. In: JAVA, pp. 36–43. ACM, New York (2000)

    Google Scholar 

  5. Meyer, B.: Object-Oriented Software Construction. Prentice Hall PTR, Englewood Cliffs (2000)

    Google Scholar 

  6. Aho, A.V., Ullman, J.D.: Principles of Compiler Design. Addison-Wesley Longman Publishing Co., Inc., Amsterdam (1977)

    MATH  Google Scholar 

  7. Dean, J., Ghemawat, S.: MapReduce: simplified data processing on large clusters. In: OSDI, USENIX Association (2004)

    Google Scholar 

  8. Bacon, D.F., Strom, R.E., Tarafdar, A.: Guava: a dialect of Java without data races. In: OOPSLA, pp. 382–400. ACM, New York (2000)

    Google Scholar 

  9. Abadi, M., Flanagan, C., Freund, S.N.: Types for safe locking: Static race detection for java. ACM Trans. Program. Lang. Syst. 28, 207–255 (2006)

    Article  Google Scholar 

  10. Boyapati, C.: Safejava: a unified type system for safe programming. Ph.D thesis, Massachusetts Institute of Technology (2004); Supervisor-Martin C. Rinard

    Google Scholar 

  11. Lucassen, J.M., Gifford, D.K.: Polymorphic effect systems. In: POPL 1988, pp. 47–57. ACM, New York (1988)

    Google Scholar 

  12. Greenhouse, A., Boyland, J.: An Object-Oriented Effects System. In: Guerraoui, R. (ed.) ECOOP 1999. LNCS, vol. 1628, pp. 205–229. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  13. Rustan, K., Leino, M.: Data groups: specifying the modification of extended state. In: OOPSLA, pp. 144–153. ACM, New York (1998)

    Google Scholar 

  14. Neamtiu, I., Hicks, M., Foster, J.S., Ratikakis, P.P.: Contextual effects for version-consistent dynamic software updating and safe concurrent programming. SIGPLAN Not. 43, 37–49 (2008)

    Article  MATH  Google Scholar 

  15. Aldrich, J., Kostadinov, V., Chambers, C.: Alias annotations for program understanding. In: OOPSLA, pp. 311–330. ACM, New York (2002)

    Google Scholar 

  16. Boyland, J., Noble, J., Retert, W.: Capabilities for Sharing: A Generalisation of Uniqueness and Read-Only. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 2–27. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  17. Noble, J., Vitek, J., Potter, J.: Flexible Alias Protection. In: Jul, E. (ed.) ECOOP 1998. LNCS, vol. 1445, pp. 158–185. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  18. Boyland, J.: Alias burying: unique variables without destructive reads. Softw. Pract. Exper. 31, 533–553 (2001)

    Article  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Matsakis, N.D., Gross, T.R. (2008). Thread Safety through Partitions and Effect Agreements. In: Amaral, J.N. (eds) Languages and Compilers for Parallel Computing. LCPC 2008. Lecture Notes in Computer Science, vol 5335. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-89740-8_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-89740-8_12

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-89739-2

  • Online ISBN: 978-3-540-89740-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics