Skip to main content

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

  • 584 Accesses

Abstract

In this talk I discuss the semantics of shared-variable concurrency, aka multi-threading. There are two well-known ways of managing concurrent threads: one either uses a preemptive or a cooperative scheduling discipline. In the former, a program, or more precisely its executable version, can be interrupted at any time during its execution by an external device, the scheduler, and the resources needed for execution are then given to another concurrent component for a while. This is perfect for executing concurrent processes, which do not share memory. In this case, the programmer does not have to care about the relative performance of the various processes in the system: this is the task of the scheduler. Unfortunately, it is very difficult to program multi-threaded applications with this model. The main difficulty is with data races, that is conflicting concurrent accesses to the memory. Although it is very easy to provide a formal “interleaving” semantics for preemptive multi-threading, this semantics usually does not coincide with what is actually implemented. In particular, the grain of atomicity is generally not preserved by the implementation, and a program may be time-sliced at some points of its execution which make no sense at the user level, and the consequence is that there is no clear semantics for the race conditions (see [14] for instance). It is therefore necessary to complement preemptive multi-threading with elaborate synchronization techniques, that require a real expertise from the programmer to be used (see [3]), and to design methods to analyze concurrent programs in order to make them “thread safe”, avoiding or detecting race conditions [1,6,11]. We shall not follow the preemptive approach in our proposal for shared-memory concurrency semantics.

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

References

  1. Abadi, M., Flanagan, C., Freund, S.N.: Types for safe locking: static race detection for Java. In: ACM TOPLAS, vol. 28(2), pp. 207–255 (2006)

    Google Scholar 

  2. Barendregt, H.: Lambda Calculi with Types. In: Abramsky, S., Gabbay, D.M., Maibaum, T.S.E. (eds.) Handbook of Logic in Computer Science, vol. 2, pp. 117–309. Oxford University Press, Oxford (1992)

    Google Scholar 

  3. Birrel, A.D.: An introduction to programming with threads, SRC Report 35 (December 1989)

    Google Scholar 

  4. Boudol, G.: On typing information flow. In: Van Hung, D., Wirsing, M. (eds.) ICTAC 2005. LNCS, vol. 3722, pp. 366–380. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  5. Girard, J.-Y., Lafont, Y., Taylor, P.: Proofs and Types. Cambridge Tracts in Theoretical Computer Science, vol. 7. Cambridge University Press, Cambridge (1989)

    MATH  Google Scholar 

  6. Grossman, D.: Type-safe multithreading in Cyclone. In: TLDI 2003, pp. 13–25 (2003)

    Google Scholar 

  7. Kleene, S.C.: On the interpretation of intuitionistic number theory. J. of Symbolic Logic 10, 109–124 (1945)

    Article  MATH  MathSciNet  Google Scholar 

  8. Landin, P.J.: The mechanical evaluation of expressions. Computer Journal 6, 308–320 (1964)

    MATH  Google Scholar 

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

    Google Scholar 

  10. Mitchell, J.C.: Foundations for Programming Languages. MIT Press, Cambridge (1996)

    Google Scholar 

  11. O’Hearn, P.W.: Resources, concurrency and local reasoning. In: Gardner, P., Yoshida, N. (eds.) CONCUR 2004. LNCS, vol. 3170, pp. 49–67. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  12. Pitts, A., Stark, I.: Operational reasoning for functions with local state. In: Gordon, A., Pitts, A. (eds.) Higher- Order Operational Techniques in Semantics, Publications of the Newton Institute, pp. 227–273. Cambridge Univ. Press, Cambridge (1998)

    Google Scholar 

  13. Plotkin, G.: Lambda-definability and logical relations, Memo SAI-RM-4, University of Edinburgh (1973)

    Google Scholar 

  14. Reynolds, J.C.: Toward a grainless semantics for shared-variable concurrency. In: Lodaya, K., Mahajan, M. (eds.) FSTTCS 2004. LNCS, vol. 3328, pp. 35–48. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  15. Tait, W.: Intensional interpretations of functionals of finite type I. J. of Symbolic Logic 32, 198–212 (1967)

    Article  MATH  MathSciNet  Google Scholar 

  16. Tait, W.: A realizability interpretation of the theory of species, Logic Colloquium. Lecture Notes in Mathematics, vol. 453, pp. 240–251 (1975)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Boudol, G. (2006). Shared-Variable Concurrency: A Proposal. In: Arun-Kumar, S., Garg, N. (eds) FSTTCS 2006: Foundations of Software Technology and Theoretical Computer Science. FSTTCS 2006. Lecture Notes in Computer Science, vol 4337. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11944836_1

Download citation

  • DOI: https://doi.org/10.1007/11944836_1

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-49994-7

  • Online ISBN: 978-3-540-49995-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics