Chapters: History, sequential programming, concurrent programming, error handling, advanced topics
They say it takes four days to complete the course. If you know a little Prolog and a little LISP it takes you rather a few hours.
The Little Book of Semaphores is a free (in both senses of the word) textbook that introduces the principles of synchronization for concurrent programming.
In most computer science curricula, synchronization is a module in an Operating Systems class. OS textbooks present a standard set of problems with a standard set of solutions, but most students don't get a good understanding of the material or the ability to solve similar problems.
The approach of this book is to identify patterns that are useful for a variety of synchronization problems and then show how they can be assembled into solutions. After each problem, the book offers a hint before showing a solution, giving students a better chance of discovering solutions on their own.
The book covers the classical problems, including "Readers-writers", "Producer-consumer", and "Dining Philosophers". In addition, it collects a number of not-so-classical problems, some written by the author and some by other teachers and textbook writers. Readers are invited to create and submit new problems.
With the advent of multi-core processors concurrent programming is becoming indispensable. Scala's primary concurrency construct is actors. Actors are basically concurrent processes that communicate by exchanging messages. Actors can also be seen as a form of active objects where invoking a method corresponds to sending a message. The Scala Actors library provides both asynchronous and synchronous message sends (the latter are implemented by exchanging several asynchronous messages). Moreover, actors may communicate using futures where requests are handled asynchronously, but return a representation (the future) that allows to await the reply. This tutorial is mainly designed as a walk-through of several complete example programs Our first example consists of two actors that exchange a bunch of messages and then terminate. The first actor sends "ping" messages to the second actor, which in turn sends "pong" messages back (for each received "ping" message one "pong" message).
JoCaml is Objective Caml plus (&) the join calculus, that is, OCaml extended for concurrent and distributed programming. The new JoCaml is a re-implementation of the now unmaintained JoCaml by Fabrice Le Fessant. With respect to this previous implementation, main changes are: * Numerous syntax changes, we believe the new syntax to be cleaner. * Disparition of mobility features, sacrified for the sake of OCaml compatibility. * Much better compatibility with Objective Caml. o Source compatibility is about 99%, there are three new keywords (def, reply and spawn) ; or and & should definitely not be used as boolean operators. o Binary compatibility for matching versions.
concurrent paradigm, namely functional programming extended with threads and ports, which I call multi-agent dataflow programming. * The declarative concurrent subset (no ports) has no race conditions and can be programmed like a functional language. The basic concept is dataflow synchronization of single-assignment variables. A useful data structure is the stream, a list with dataflow tail used as a communication channel. * Nondeterminism can be added exactly where needed and minimally, by using ports - a named stream to which any thread can send. * All functional building blocks are concurrency patterns. Map, fold, filter, etc., are all useful for building concurrent programs. * Concurrent systems can be configured in any order and concurrently with actual use of the system. * Designing concurrent programs is any declarative part of the program can be put in own thread, loosening the coupling between system's parts * The paradigm is easily extended
This is an Erlang solution to "The Santa Claus problem", % as discussed by Simon Peyton Jones (with a Haskell solution using % Software Transactional Memory) in "Beautiful code". % He quotes J.A.Trono "A new exercise in concurrency", SIGCSE 26:8-10, 1994.
The process of writing large parallel programs is complicated by the need to specify both the parallel behaviour of the program and the algorithm that is to be used to compute its result.
Dynamic Networks Everything I described so far is common to CSP (Communicating Sequential Processes) and the Actor model. Here’s what makes actors more general: Connections between actors are dynamic. Unlike processes in CSP, actors may establish communication channels dynamically. They may pass messages containing references to actors (or mailboxes). They can then send messages to those actors. Here’s a Scala example: receive { case (name: String, actor: Actor) => actor ! lookup(name) } The original message is a tuple combining a string and an actor object. The receiver sends the result of lookup(name) to the actor it has just learned about. Thus a new communication channel between the receiver and the unknown actor can be established at runtime. (In Kilim the same is possible by passing mailboxes via messages.)
S. Abramsky. Electronic Notes in Theoretical Computer Science, (2006)Proceedings of the Workshop "Essays on Algebraic Process Calculi" (APC 25)Proceedings of the Workshop "Essays on Algebraic Process Calculi" (APC 25).
D. Aumayr, S. Marr, E. Gonzalez Boix, and H. Mössenböck. Proceedings of the 16th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes, page 157--171. ACM, (October 2019)
J. Bezivin. OOPSLA '87: Conference proceedings on Object-oriented programming systems, languages and applications, page 394--405. New York, NY, USA, ACM, (1987)
R. Blumofe, C. Joerg, B. Kuszmaul, C. Leiserson, K. Randall, and Y. Zhou. Proceedings of the Fifth ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP), 30, page 207--216. New York, NY, USA, ACM, (July 1995)
D. Bonetta, L. Salucci, S. Marr, and W. Binder. Proceedings of the 2016 ACM International Conference on Object Oriented Programming Systems Languages & Applications, page 531--547. ACM, (Nov 2, 2016)(acceptance rate 25%).
M. Cao, M. Zhang, A. Sengupta, and M. Bond. Proceedings of the 21st ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, page 20:1--20:13. ACM, (2016)
I. Cassar, and A. Francalanza. Proceedings 13th International Workshop on Foundations of Coordination Languages and Self-Adaptive Systems, page 54--68. (September 2014)
X. Chang, W. Dou, Y. Gao, J. Wang, J. Wei, and T. Huang. Proceedings of the 41st International Conference on Software Engineering, page 631--642. IEEE Press, (May 2019)
B. Claudel, Q. Sabah, and J. Stefani. Formal Techniques for Distributed Objects, Components, and Systems, volume 9039 of Lecture Notes in Computer Science, Springer, (2015)
N. Cohen, A. Tal, and E. Petrank. Proceedings of the 22Nd ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, page 17--29. ACM, (2017)
T. Cutsem, S. Mostinckx, and W. Meuter. Computer Languages, Systems & Structures, 35 (1):
80 - 98(2009)ESUG 2007 International Conference on Dynamic Languages (ESUG/ICDL 2007).
B. Daloze, S. Marr, D. Bonetta, and H. Mössenböck. Proceedings of the 2016 ACM International Conference on Object Oriented Programming Systems Languages & Applications, page 642--659. ACM, (Nov 2, 2016)(acceptance rate 25%).
B. Daloze, C. Seaton, D. Bonetta, and H. Mössenböck. Proceedings of the 10th International Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems, (2015)
P. Damron, A. Fedorova, Y. Lev, V. Luchangco, M. Moir, and D. Nussbaum. ASPLOS-XII: Proceedings of the 12th international conference on Architectural support for programming languages and operating systems, page 336--346. New York, NY, USA, ACM, (2006)
F. David, G. Thomas, J. Lawall, and G. Muller. Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages &\#38; Applications, page 291--307. ACM, (2014)
J. De Koster, S. Marr, and T. D'Hondt. Proceedings of the 17th ACM SIGPLAN symposium on Principles and Practice of Parallel Programming, page 317--318. ACM, (February 2012)(Poster).
J. De Koster, S. Marr, T. D'Hondt, and T. Van Cutsem. Proceedings of AGERE! 2013, 3rd International Workshop on Programming based on Actors, Agents, and Decentralized Control, page 61--68. (Oct 27, 2013)
J. De Koster, T. Van Cutsem, and W. De Meuter. Proceedings of the 6th International Workshop on Programming Based on Actors, Agents, and Decentralized Control, page 31--40. ACM, (2016)
S. Dekeyser, and J. Hidders. ADC '04: Proceedings of the fifteenth Australasian database conference, page 93--101. Darlinghurst, Australia, Australia, Australian Computer Society, Inc., (2004)
B. Demsky, and P. Lam. Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering - Volume 1, page 395--404. New York, NY, USA, ACM, (2010)
D. Deng, W. Zhang, and S. Lu. Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages & Applications, page 785--802. ACM, (2013)
R. Dias, T. Vale, and J. Lourenço. Euro-Par 2012 Parallel Processing, volume 7484 of Lecture Notes in Computer Science, page 589-600. Springer Berlin Heidelberg, (2012)
T. Elmas, S. Qadeer, and S. Tasiran. Proceedings of the 28th ACM SIGPLAN Conference on Programming Language Design and Implementation, page 245--255. ACM, (2007)
E. Emerson, and K. Namjoshi. LICS '98: Proceedings of the 13th Annual IEEE Symposium on Logic in Computer Science, page 70. Washington, DC, USA, IEEE Computer Society, (1998)
C. Flanagan, and S. Freund. Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation, page 121--133. ACM, (2009)
S. Fowler, S. Lindley, and P. Wadler. 31st European Conference on Object-Oriented Programming (ECOOP 2017), volume 74 of Leibniz International Proceedings in Informatics (LIPIcs), page 11:1--11:28. Dagstuhl, Germany, Schloss Dagstuhl--Leibniz-Zentrum für Informatik, (2017)
M. Frigo, P. Halpern, C. Leiserson, and S. Lewin-Berlin. Proceedings of the twenty-first annual symposium on Parallelism in algorithms and architectures, page 79--90. New York, NY, USA, ACM, (2009)
D. Grossman. Lecture Notes, Department of Computer Science & Engineering, University of Washington, AC101 Paul G. Allen Center, Box 352350, 185 Stevens Way, Seattle, WA 98195-2350, (Dec 8, 2012)
D. Grossman, and R. Anderson. Proceedings of the 43rd ACM technical symposium on Computer Science Education, page 505--510. New York, NY, USA, ACM, (2012)
J. Ha, M. Arnold, S. Blackburn, and K. McKinley. Proceedings of the 24th ACM SIGPLAN Conference on Object Oriented Programming Systems Languages and Applications, page 155--174. ACM, (2009)