Skip to main content

Isolating Determinism in Multi-threaded Programs

  • Conference paper
  • 1407 Accesses

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 7186))

Abstract

Futures are a program abstraction that express a simple form of fork-join parallelism. The expression future (e) declares that e can be evaluated concurrently with the future’s continuation. Safe-futures provide additional deterministic guarantees, ensuring that all data dependencies found in the original (non-future annotated) version are respected. In this paper, we present a dynamic analysis for enforcing determinism of safe-futures in an ML-like language with dynamic thread creation and first-class references. Our analysis tracks the interaction between futures (and their continuations) with other explicitly defined threads of control, and enforces an isolation property that prevents the effects of a continuation from being witnessed by its future, indirectly through their interactions with other threads. Our analysis is defined via a lightweight capability-based dependence tracking mechanism that serves as a compact representation of an effect history. Implementation results support our premise that futures and threads can extract additional parallelism compared to traditional approaches for safe-futures.

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

Buying options

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

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Navabi, A., Zhang, X., Jagannathan, S.: Quasi-static Scheduling for Safe Futures. In: PPoPP, pp. 23–32. ACM (2008)

    Google Scholar 

  2. Navabi, A., Zhang, X., Jagannathan, S.: Dependence Analysis for Safe Futures. Science of Computer Programming (2011)

    Google Scholar 

  3. Welc, A., Jagannathan, S., Hosking, A.: Safe Futures for Java. In: OOPSLA, pp. 439–435. ACM (2005)

    Google Scholar 

  4. Flanagan, C., Qadeer, S.: A Type and Effect System for Atomicity. In: PLDI, pp. 338–349 (2003)

    Google Scholar 

  5. Halstead, R.: Multilisp: A Language for Concurrent Symbolic Computation. ACM Trans. Program. Lang. Syst. 7, 501–538 (1985)

    Article  MATH  Google Scholar 

  6. http://java.sun.com/j2se/1.5.0/docs/guide/concurrency

  7. Allan, E., Chase, D., Hallett, J., Luchangco, V., Maessen, J., Ryu, S., Steele, G., Tobin-Hochstadt, S.: The Fortress Language Specification Version 1.0. Technical report, Sun Microsystems, Inc. (2008)

    Google Scholar 

  8. Charles, P., Grothoff, C., Saraswat, V., Donawa, C., Kielstra, A., Ebcioglu, K., von Praun, C., Sarkar, V.: X10: an object-oriented approach to non-uniform cluster computing. In: OOPSLA, pp. 519–538. ACM (2005)

    Google Scholar 

  9. Liskov, B., Shrira, L.: Promises: Linguistic Support for Efficient Asynchronous Procedure Calls in Distributed Systems. In: PLDI, pp. 260–267. ACM (1988)

    Google Scholar 

  10. Pratikakis, P., Spacco, J., Hicks, M.: Transparent Proxies for Java Futures. In: OOPSLA, pp. 206–223. ACM (2004)

    Google Scholar 

  11. Zhang, L., Krintz, C., Nagpurkar, P.: Supporting Exception Handling for Futures in Java. In: PPPJ, pp. 175–184. ACM (2007)

    Google Scholar 

  12. Flanagan, C., Felleisen, M.: The semantics of future and an application. Journal of Functional Programming 9, 1–31 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  13. Navabi, A., Jagannathan, S.: Exceptionally Safe Futures. In: Field, J., Vasconcelos, V.T. (eds.) COORDINATION 2009. LNCS, vol. 5521, pp. 47–65. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  14. de Boer, F.S., Clarke, D., Johnsen, E.B.: A Complete Guide to the Future. In: De Nicola, R. (ed.) ESOP 2007. LNCS, vol. 4421, pp. 316–330. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  15. Adve, S.V., Heumann, S., Komuravelli, R., Overbey, J., Simmons, P., Sung, H., Vakilian, M.: A type and effect system for deterministic parallel java. In: OOPSLA (2009)

    Google Scholar 

  16. Berger, E.D., Yang, T., Liu, T., Novark, G.: Grace: safe multithreaded programming for c/c++. In: OOPSLA, pp. 81–96. ACM, New York (2009)

    Google Scholar 

  17. Boudol, G., Petri, G.: A Theory of Speculative Computation. In: Gordon, A.D. (ed.) ESOP 2010. LNCS, vol. 6012, pp. 165–184. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  18. Flanagan, C., Freund, S.N., Yi, J.: Velodrome: a sound and complete dynamic atomicity checker for multithreaded programs. In: PLDI, pp. 293–303 (2008)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Ziarek, L., Tiwary, S., Jagannathan, S. (2012). Isolating Determinism in Multi-threaded Programs. In: Khurshid, S., Sen, K. (eds) Runtime Verification. RV 2011. Lecture Notes in Computer Science, vol 7186. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-29860-8_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-29860-8_6

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-29859-2

  • Online ISBN: 978-3-642-29860-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics