Abstract
We take a thread as the behavior of a sequential deterministic program under execution and multi-threading as the form of concurrency provided by contemporary programming languages such as Java and C#. We outline an algebraic theory about threads and multi-threading. In the case of multi-threading, some deterministic interleaving strategy determines how threads are interleaved. Interleaving operators for a number of plausible interleaving strategies are specified in a simple and concise way. By that, we show that it is essentially open-ended what counts as an interleaving strategy. We use deadlock freedom as an example to show that there are properties of multi-threaded programs that depend on the interleaving strategy used.
Article PDF
Similar content being viewed by others
References
Aceto L, Fokkink WJ, Verhoef C (2001) Structural operational semantics. In: Bergstra JA, Ponse A, Smolka SA (eds). Handbook of process algebra. Elsevier, Amsterdam, pp. 197–292
Arnold K, Gosling J (1996) The Java programming language. Addison-Wesley, Reading, MA
Baeten JCM, Bergstra JA (1992) Process algebra with signals and conditions. In: Broy M (eds). Programming and mathematical methods, Vol. F88 of NATO ASI Series. Springer, Heidelberg, pp. 273–323
Bergstra JA, Bethke I (2003). Polarized process algebra and program equivalence. In: Baeten JCM, Lenstra JK, Parrow J, Woeginger GJ (eds). Proceedings 30th ICALP. Lecture notes in computer science, Vol 2719. Springer, Heidelberg, pp. 1–21
Bergstra JA, Bethke I (2005) Polarized process algebra with reactive composition. Theor Comput Sci 343:285–304
Bergstra JA, Bethke I, Ponse A (2005) Decision problems for pushdown threads. Report PRG0502, Programming Research Group, University of Amsterdam
Brookes SD, Hoare CAR, Roscoe AW (1984) A theory of communicating sequential processes. J ACM 31(3):560–599
Bergstra JA, Klop JW (1984) Process algebra for synchronous communication. Inform Control 60(1/3):109–137
Bergstra JA, Loots ME (2002) Program algebra for sequential code. J Logic Algebraic Programm 51(2):125–156
Bergstra JA, Middelburg CA (2005) Simulating Turing machines on Maurer machines. Computer Science Report 05-28, Department of Mathematics and Computer Science, Eindhoven University of Technology, November 2005
Bergstra JA, Middelburg CA (2005). A thread algebra with multi-level strategic interleaving. In: Cooper SB, Löwe B, Torenvliet L (eds). CiE 2005. Lecture notes in computer science, Vol 3526. Springer, Heidelberg, pp. 35–48
Bergstra JA, Middelburg CA (2006) Maurer computers for pipelined instruction processing. Computer Science Report 06-12, Department of Mathematics and Computer Science, Eindhoven University of Technology, March 2006
Bergstra JA, Middelburg CA (2006) Synchronous cooperation for explicit multi-threading. Computer Science Report 06-29, Department of Mathematics and Computer Science, Eindhoven University of Technology, September 2006
Bergstra JA, Middelburg CA (2006) Thread algebra with multi-level strategies. Fundam Informa 71(2/3):153–182
Bergstra JA, Middelburg CA (2006) A thread calculus with molecular dynamics. Computer Science Report 06-24, Department of Mathematics and Computer Science, Eindhoven University of Technology, August 2006
Bergstra JA, Middelburg CA (2007) Maurer computers with single-thread control. Fundam Inform (in press). Preliminary version: Computer Science Report 05-17, Department of Mathematics and Computer Science, Eindhoven University of Technology
Bergstra JA, Middelburg CA (2007) A thread algebra with multi-level strategic interleaving. Theory Comput Syst 41(1) (in press). Preliminary version: Computer Science Report 06-28, Department of Mathematics and Computer Science, Eindhoven University of Technology
Bergstra JA, Ponse A (2002) Combining programs and state machines. J Logic Algebraic Program 51(2):175–192
Bergstra JA, Ponse A (2007) Execution architectures for program algebra. J Appl Logic (in press). Preliminary version: Logic Group Preprint Series 230, Department of Philosophy, Utrecht University
Baeten JCM, Weijland WP (1990) Process algebra. Cambridge tracts in theoretical computer science, Vol 18. Cambridge University Press, Cambridge
Gosling J, Joy B, Steele G, Bracha G (2000) The Java language specification, 2nd edn. Addison-Wesley, Reading, MA
Hoare CAR (1985) Communicating sequential processes. Prentice-Hall, Englewood Cliffs
Hejlsberg A, Wiltamuth S, Golde P (2003) C# Language Specification. Addison-Wesley, Reading, MA
Jesshope CR, Luo B (2000) Micro-threading: A new approach to future RISC. In: Australian computer architecture conference 2000. IEEE Computer Society Press, pp. 34–41
Maurer WD (1966) A theory of computer instructions. J ACM 13(2):226–235
Maurer WD (2006) A theory of computer instructions. Sci Comput Program 60:244–273
Middelburg CA (2003) An alternative formulation of operational conservativity with binding terms. J Logic Algebraic Program 55(1/2):1–19
Milner R (1980) A calculus of communicating systems. Lecture notes in computer science, Vol 92. Springer, Berlin
Milner R (1989) Communication and concurrency. Prentice-Hall, Englewood Cliffs
Mousavi MR, Reniers MA, Groote JF (2005) Notions of bisimulation and congruence formats for SOS with data. Inform Comput 200:107–147
Petri CA (1962). Kommunikation mit Automaten. PhD thesis. Institut für Instrumentelle Mathematik, Bonn
Reisig W (1985) Petri nets: an introduction. Monographs in theoretical computer science, Vol. 4. An EATCS Series. Springer, Berlin
van Glabbeek RJ (1987). Bounded nondeterminism and the approximation induction principle in process algebra. In: Brandenburg FJ, Vidal-Naquet G, Wirsing M (eds). STACS 87. Lecture notes in computer science, Vol 247. Springer, Heidelberg, pp. 336–347
Author information
Authors and Affiliations
Corresponding author
Additional information
C. B. Jones
Rights and permissions
Open Access This is an open access article distributed under the terms of the Creative Commons Attribution Noncommercial License ( https://creativecommons.org/licenses/by-nc/2.0 ), which permits any noncommercial use, distribution, and reproduction in any medium, provided the original author(s) and source are credited.
About this article
Cite this article
Bergstra, J.A., Middelburg, C.A. Thread algebra for strategic interleaving. Form Asp Comp 19, 445–474 (2007). https://doi.org/10.1007/s00165-007-0024-9
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00165-007-0024-9