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.
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.
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.
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.
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.
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).
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.)
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. Huang, and C. Zhang. Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications, volume 47 of OOPSLA '12, page 451--466. ACM, (October 2012)
M. Zhang, J. Huang, M. Cao, and M. Bond. Proceedings of the 20th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, page 97--108. ACM, (2015)
M. Herlihy, and J. Wing. POPL '87: Proceedings of the 14th ACM SIGACT-SIGPLAN symposium on Principles of programming languages, page 13--26. New York, NY, USA, ACM, (1987)
R. von Behren, J. Condit, and E. Brewer. Proceedings of the 9th conference on Hot Topics in Operating Systems - Volume 9, page 4. Berkeley, CA, USA, USENIX Association, (2003)
D. Ungar, and S. Adams. Proceedings of the ACM international conference companion on Object oriented programming systems languages and applications companion, page 19--26. New York, NY, USA, ACM, (2010)
S. Tasiran, A. Sezgin, and S. Quadeer. Design and Validation of Concurrent Systems, 09361, Dagstuhl, Germany, Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, Germany, (2010)
P. Liu, X. Zhang, O. Tripp, and Y. Zheng. Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation, page 55--64. ACM, (2015)
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)
S. Tasharofi, M. Pradel, Y. Lin, and R. Johnson. 2013 28th IEEE/ACM International Conference on Automated Software Engineering, page 114-124. (November 2013)
S. Tasharofi, R. Karmani, S. Lauterburg, A. Legay, D. Marinov, and G. Agha. Formal Techniques for Distributed Systems: Joint 14th IFIP WG 6.1 International Conference, FMOODS 2012 and 32nd IFIP WG 6.1 International Conference, FORTE 2012, Stockholm, Sweden, June 13-16, 2012. Proceedings, page 219--234. Springer, (2012)
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)
N. Jalbert, and K. Sen. Proceedings of the Eighteenth ACM SIGSOFT International Symposium on Foundations of Software Engineering, page 57--66. New York, NY, USA, ACM, (2010)
J. Bezivin. OOPSLA '87: Conference proceedings on Object-oriented programming systems, languages and applications, page 394--405. New York, NY, USA, ACM, (1987)
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)
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)
S. Marr, and T. D'Hondt. Objects, Models, Components, Patterns, 50th International Conference, TOOLS 2012, volume 7304 of TOOLS'12 (LNCS), page 171-186. Berlin / Heidelberg, Springer, (May 2012)(acceptance rate 31%).
J. Protze, M. Schulz, D. Ahn, and M. Müller. Proceedings of the 27th International Symposium on High-Performance Parallel and Distributed Computing, page 144--155. ACM, (2018)
V. Raychev, M. Vechev, and M. Sridharan. Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages &\#38; Applications, page 151--166. ACM, (2013)
T. Tu, X. Liu, L. Song, and Y. Zhang. Proceedings of the Twenty-Fourth International Conference on Architectural Support for Programming Languages and Operating Systems - ASPLOS \textquotesingle19, ACM, (2019)
B. Morandi, S. Bauer, and B. Meyer. Advanced Lectures on Software Engineering, LASER Summer School 2007/2008, volume 6029 of Lecture Notes in Computer Science, page 41-90. Springer, (2008)
J. Reppy, C. Russo, and Y. Xiao. Proceedings of the 14th ACM SIGPLAN international conference on Functional programming, page 257--268. New York, NY, USA, ACM, (August 2009)
T. Usui, R. Behrends, J. Evans, and Y. Smaragdakis. Parallel Architectures and Compilation Techniques, 2009. PACT '09. 18th International Conference on, page 3--14. (September 2009)
J. Swalens, S. Marr, J. De Koster, and T. Van Cutsem. Proceedings of the Workshop on Programming Language Approaches to Concurrency and communication-cEntric Software (PLACES), volume 155 of PLACES '14, page 54--60. (April 2014)
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)
A. Matveev, N. Shavit, P. Felber, and P. Marlier. Proceedings of the 25th Symposium on Operating Systems Principles, page 168--183. New York, NY, USA, ACM, (2015)
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. Lu, J. Tucek, F. Qin, and Y. Zhou. Proceedings of the 12th International Conference on Architectural Support for Programming Languages and Operating Systems, page 37--48. ACM, (2006)
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)
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)