Advertisement

Formal Aspects of Computing

, Volume 19, Issue 4, pp 445–474 | Cite as

Thread algebra for strategic interleaving

  • J. A. Bergstra
  • C. A. MiddelburgEmail author
Open Access
ORIGINAL ARTICLE

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.

Keywords

Threads Multi-threading Thread algebra Interleaving strategies Services Deadlock freedom 

References

  1. AFV01.
    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–292Google Scholar
  2. AG96.
    Arnold K, Gosling J (1996) The Java programming language. Addison-Wesley, Reading, MAzbMATHGoogle Scholar
  3. BB92.
    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–323Google Scholar
  4. BB03.
    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–21Google Scholar
  5. BB05.
    Bergstra JA, Bethke I (2005) Polarized process algebra with reactive composition. Theor Comput Sci 343:285–304zbMATHCrossRefMathSciNetGoogle Scholar
  6. BBP05.
    Bergstra JA, Bethke I, Ponse A (2005) Decision problems for pushdown threads. Report PRG0502, Programming Research Group, University of AmsterdamGoogle Scholar
  7. BHR84.
    Brookes SD, Hoare CAR, Roscoe AW (1984) A theory of communicating sequential processes. J ACM 31(3):560–599zbMATHCrossRefMathSciNetGoogle Scholar
  8. BK84.
    Bergstra JA, Klop JW (1984) Process algebra for synchronous communication. Inform Control 60(1/3):109–137zbMATHCrossRefMathSciNetGoogle Scholar
  9. BL02.
    Bergstra JA, Loots ME (2002) Program algebra for sequential code. J Logic Algebraic Programm 51(2):125–156zbMATHCrossRefMathSciNetGoogle Scholar
  10. BM05a.
    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 2005Google Scholar
  11. BM05b.
    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–48Google Scholar
  12. BM06a.
    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 2006Google Scholar
  13. BM06b.
    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 2006Google Scholar
  14. BM06c.
    Bergstra JA, Middelburg CA (2006) Thread algebra with multi-level strategies. Fundam Informa 71(2/3):153–182zbMATHMathSciNetGoogle Scholar
  15. BM06d.
    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 2006Google Scholar
  16. BM07a.
    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 TechnologyGoogle Scholar
  17. BM07b.
    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 TechnologyGoogle Scholar
  18. BP02.
    Bergstra JA, Ponse A (2002) Combining programs and state machines. J Logic Algebraic Program 51(2):175–192zbMATHCrossRefMathSciNetGoogle Scholar
  19. BP07.
    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 UniversityGoogle Scholar
  20. BW90.
    Baeten JCM, Weijland WP (1990) Process algebra. Cambridge tracts in theoretical computer science, Vol 18. Cambridge University Press, CambridgeGoogle Scholar
  21. GJSB00.
    Gosling J, Joy B, Steele G, Bracha G (2000) The Java language specification, 2nd edn. Addison-Wesley, Reading, MAGoogle Scholar
  22. Hoa85.
    Hoare CAR (1985) Communicating sequential processes. Prentice-Hall, Englewood CliffszbMATHGoogle Scholar
  23. HWG03.
    Hejlsberg A, Wiltamuth S, Golde P (2003) C# Language Specification. Addison-Wesley, Reading, MAGoogle Scholar
  24. JL00.
    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–41Google Scholar
  25. Mau66.
    Maurer WD (1966) A theory of computer instructions. J ACM 13(2):226–235zbMATHCrossRefGoogle Scholar
  26. Mau06.
    Maurer WD (2006) A theory of computer instructions. Sci Comput Program 60:244–273zbMATHCrossRefMathSciNetGoogle Scholar
  27. Mid03.
    Middelburg CA (2003) An alternative formulation of operational conservativity with binding terms. J Logic Algebraic Program 55(1/2):1–19zbMATHCrossRefMathSciNetGoogle Scholar
  28. Mil80.
    Milner R (1980) A calculus of communicating systems. Lecture notes in computer science, Vol 92. Springer, BerlinzbMATHGoogle Scholar
  29. Mil89.
    Milner R (1989) Communication and concurrency. Prentice-Hall, Englewood CliffszbMATHGoogle Scholar
  30. MRG05.
    Mousavi MR, Reniers MA, Groote JF (2005) Notions of bisimulation and congruence formats for SOS with data. Inform Comput 200:107–147zbMATHCrossRefMathSciNetGoogle Scholar
  31. Pet62.
    Petri CA (1962). Kommunikation mit Automaten. PhD thesis. Institut für Instrumentelle Mathematik, BonnGoogle Scholar
  32. Rei85.
    Reisig W (1985) Petri nets: an introduction. Monographs in theoretical computer science, Vol. 4. An EATCS Series. Springer, BerlinGoogle Scholar
  33. vG87.
    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–347CrossRefGoogle Scholar

Copyright information

© British Computer Society 2007

Authors and Affiliations

  1. 1.Programming Research GroupUniversity of AmsterdamAmsterdamThe Netherlands
  2. 2.Department of PhilosophyUtrecht UniversityUtrechtThe Netherlands
  3. 3.Division of Computer ScienceEindhoven University of TechnologyEindhovenThe Netherlands

Personalised recommendations