Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1480881.1480887acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

A model of cooperative threads

Published: 21 January 2009 Publication History

Abstract

We develop a model of concurrent imperative programming with threads. We focus on a small imperative language with cooperative threads which execute without interruption until they terminate or explicitly yield control. We define and study a trace-based denotational semantics for this language; this semantics is fully abstract but mathematically elementary. We also give an equational theory for the computational effects that underlie the language, including thread spawning. We then analyze threads in terms of the free algebra monad for this theory.

References

[1]
Mart'ın Abadi, Andrew Birrell, Tim Harris, and Michael Isard. Semantics of transactional memory and automatic mutual exclusion. In Proceedings of the 35th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 63--74, 2008.
[2]
Mart'ın Abadi and Gordon D. Plotkin. A logical view of composition. Theoretical Computer Science, 114(1):3--30, June 1993.
[3]
Karl Abrahamson. Modal logic of concurrent nondeterministic programs. In Gilles Kahn, editor, International Symposium on Semantics of Concurrent Computation, volume 70 of Lecture Notes in Computer Science, pages 21-33. Springer, 1979.
[4]
Atul Adya, Jon Howell, Marvin Theimer, William J. Bolosky, and John R. Douceur. Cooperative task management without manual stack management. In Proceedings of the General Track: the 2002 USENIX Annual Technical Conference, pages 289-302, 2002.
[5]
Roberto Amadio and Silvano Dal Zilio. Resource control for synchronous cooperative threads. Theoretical Computer Science, 358:229--254, 2006.
[6]
Nick Benton, John Hughes, and Eugenio Moggi. Monads and effects. In Gilles Barthe, Peter Dybjer, Lu'ıs Pinto, and João Saraiva, editors, Advanced Lectures from International Summer School on Applied Semantics, volume 2395 of Lecture Notes in Computer Science, pages 42--122. Springer, 2002.
[7]
Dave Berry, Robin Milner, and David N. Turner. A semantics for ML concurrency primitives. In Proceedings of the 19th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 119--129, 1992.
[8]
Gérard Boudol. Fair cooperative multithreading. In Luís Caires and Vasco Thudichum Vasconcelos, editors, Concurrency Theory, 18th International Conference, volume 4703 of Lecture Notes in Computer Science, pages 272--286. Springer, 2007.
[9]
Fréderic Boussinot. Fairthreads: mixing cooperative and preemptive threads in C. Concurrency and Computation: Practice and Experience, 18(5):445--469, April 2006.
[10]
Stephen Brookes. Full abstraction for a shared-variable parallel language. Information and Computation, 127(2):145--163, June 1996.
[11]
Stephen Brookes. The essence of parallel Algol. Information and Computation, 179(1):118--149, 2002.
[12]
Pietro Cenciarelli and Eugenio Moggi. A syntactic approach to modularity in denotational semantics. In Proceedings of the 5th Biennial Meeting on Category Theory and Computer Science, 1993.
[13]
William Ferreira and Matthew Hennessy. A behavioural theory of first-order CML. Theoretical Computer Science, 216(1-2):55--107, 1999.
[14]
Tim Harris, Simon Marlow, Simon Peyton-Jones, and Maurice Herlihy. Composable memory transactions. In Proceedings of the 10th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 48--60, 2005.
[15]
Matthew Hennessy and Gordon D. Plotkin. Full abstraction for a simple programming language. In J. Bećvář, editor, 8th Symposium on Mathematical Foundations of Computer Science, volume 74 of Lecture Notes in Computer Science, pages 108--120. Springer, 1979.
[16]
E. Horita, J. W. de Bakker, and J. J. M. M. Rutten. Fully abstract denotational models for nonuniform concurrent languages. Information and Computation, 115(1):125--178, 1994.
[17]
Martin Hyland, Gordon Plotkin, and John Power. Combining effects: Sum and tensor. Theoretical Computer Science, 357(1-3):70--99, 2006.
[18]
Michael Isard and Andrew Birrell. Automatic mutual exclusion. In Proceedings of the 11th USENIX workshop on Hot Topics in Operating Systems, pages 1--6, 2007.
[19]
Alan Jeffrey. A fully abstract semantics for a concurrent functional language with monadic types. In Proceedings, Tenth Annual IEEE Symposium on Logic in Computer Science, pages 255--264, 1995.
[20]
Alan Jeffrey. Semantics for core Concurrent ML using computation types. In Higher order operational techniques in semantics, pages 55--90. Cambridge University Press, 1997.
[21]
Alan Jeffrey and Julian Rathke. A fully abstract may testing semantics for concurrent objects. Theoretical Computer Science, 338(1-3):17--63, June 2005.
[22]
Microsoft. SQL Server 2005 books online. CLR Hosted Environment, at http://msdn.microsoft.com/en-us/library/ms131047.aspx, September 2007.
[23]
Prakash Panangaden and John H. Reppy. The essence of Concurrent ML. In Flemming Nielson, editor, ML with Concurrency, chapter 1, pages 5--29. Springer, 1997.
[24]
Gordon Plotkin and John Power. Notions of computation determine monads. Lecture Notes in Computer Science, 2303:373--393, 2002.
[25]
Gordon D. Plotkin and John Power. Algebraic operations and generic effects. Applied Categorical Structures, 11(1):69--94, 2003.
[26]
Gordon D. Plotkin and Matija Pretnar. A logic for algebraic effects. In Proceedings, Twenty-Third Annual IEEE Symposium on Logic in Computer Science, pages 118--129, 2008.
[27]
Nir Shavit and Dan Touitou. Software transactional memory. In Proceedings of the 14th Annual ACM Symposium on Principles of Distributed Computing, pages 204--213, 1995.
[28]
Yannis Smaragdakis, Anthony Kay, Reimer Behrends, and Michal Young. Transactions with isolation and cooperation. In Proceedings of the 22nd Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 191--210, 2007.
[29]
J. Robert von Behren, Jeremy Condit, Feng Zhou, George C. Necula, and Eric A. Brewer. Capriccio: scalable threads for Internet services. In Proceedings of the 19th ACM Symposium on Operating Systems Principles, pages 268--281, 2003.
[30]
Glynn Winskel. The Formal Semantics of Programming Languages. The MIT Press, 1993.

Cited By

View all
  • (2020)Incremental potential contactACM Transactions on Graphics10.1145/3386569.339242539:4(49:1-49:20)Online publication date: 12-Aug-2020
  • (2020)Informative scene decomposition for crowd analysis, comparison and simulation guidanceACM Transactions on Graphics10.1145/3386569.339240739:4(50:1-50:13)Online publication date: 12-Aug-2020
  • (2020)Collaborative е-Rulemaking, Democratic Bots, and the Future of Digital DemocracyDigital Government: Research and Practice10.1145/33524631:1(1-13)Online publication date: 19-Feb-2020
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
POPL '09: Proceedings of the 36th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
January 2009
464 pages
ISBN:9781605583792
DOI:10.1145/1480881
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 44, Issue 1
    POPL '09
    January 2009
    453 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1594834
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 21 January 2009

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. denotational semantics
  2. monad
  3. operational semantics
  4. transaction

Qualifiers

  • Research-article

Conference

POPL09

Acceptance Rates

Overall Acceptance Rate 824 of 4,130 submissions, 20%

Upcoming Conference

POPL '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)6
  • Downloads (Last 6 weeks)1
Reflects downloads up to 09 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (2020)Incremental potential contactACM Transactions on Graphics10.1145/3386569.339242539:4(49:1-49:20)Online publication date: 12-Aug-2020
  • (2020)Informative scene decomposition for crowd analysis, comparison and simulation guidanceACM Transactions on Graphics10.1145/3386569.339240739:4(50:1-50:13)Online publication date: 12-Aug-2020
  • (2020)Collaborative е-Rulemaking, Democratic Bots, and the Future of Digital DemocracyDigital Government: Research and Practice10.1145/33524631:1(1-13)Online publication date: 19-Feb-2020
  • (2019)Reasoning about a Machine with Local CapabilitiesACM Transactions on Programming Languages and Systems10.1145/336351942:1(1-53)Online publication date: 10-Dec-2019
  • (2019)Behavioural Equivalence via Modalities for Algebraic EffectsACM Transactions on Programming Languages and Systems10.1145/336351842:1(1-45)Online publication date: 21-Nov-2019
  • (2019)Evaluating the Impact of Technology Assisted Hotspot Policing on Situational Awareness and Task-LoadProceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies10.1145/33143963:1(1-18)Online publication date: 29-Mar-2019
  • (2019)Towards certified separate compilation for concurrent programsProceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3314221.3314595(111-125)Online publication date: 8-Jun-2019
  • (2019)Rethinking Incremental and Parallel Pointer AnalysisACM Transactions on Programming Languages and Systems10.1145/329360641:1(1-31)Online publication date: 1-Mar-2019
  • (2019)Do Game Designers’ Decisions Related to Visual Activities Affect Knowledge Acquisition in Cultural Heritage Games? An Evaluation From a Human Cognitive Processing PerspectiveJournal on Computing and Cultural Heritage 10.1145/329205712:1(1-25)Online publication date: 20-Feb-2019
  • (2019)Practical Subtyping for Curry-Style LanguagesACM Transactions on Programming Languages and Systems10.1145/328595541:1(1-58)Online publication date: 28-Feb-2019
  • Show More Cited By

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media