Lecture 10: Some Other Programming-Language Approaches to Concurrency

Title slide

Slides : Recording

This lecture set out some alternative approaches for managing concurrency in programming languages: asynchronous message-passing Actors and the cheerfully optimistic concurrency of Software Transactional Memory. These are two examples from a wide range of mechanisms in use across many programming languages and applications domains, all of which seek to balance the key concurrency requirements of separation to prevent inconsistency and co-operation to allow interaction.

Note: There’s a problem with the recording for this lecture: it has no sound. I’ve retrieved an old audio-only recording instead and put that up by way of replacement.

In a further complication, the slides from this lecture give rise to some error in this WordPress server. Instead I’m linking to the copy on Learn. That should be seamless: if it’s not then please tell me.

Links: Slides from Lecture 10; Substitute recording of Lecture 10

Homework
1. Read These

The Go language provides concurrent goroutines and named channels for communication between them. Read the following two articles about this.

Optionally, if you are interested to find out more then try these two video talks by Rob Pike.

You can also see more code details in the following.

2. Do This

Who uses Erlang? What do they do with it?

  • Read up about Erlang, its use of actors, supervision, and live code replacement

  • Find an example of some software / a system / a service / a company that uses the language and where someone has written about that.

  • Post your example to the mailing list or Piazza.

References

What is Scala
Martin Odersky

Very short article setting out some of the ideas and design principles behind Scala, written by the creator of the language. This dropped off the main Scala site back in 2017, so I have provided a link to an archived version.

Links: Archive article; Main Scala site

Screenshot of web page

Akka

Actor-style concurrency for Scala, with message-passing, mailbox patterns, and supervision trees.

Link: Home page

Akka logo

Practical Lock-Freedom
Keir Fraser

PhD thesis and Technical report 579
University of Cambridge Computer Laboratory, 2004

Link: Report

Screenshot of web page

Beautiful Concurrency
Simon Peyton Jones

Chapter 24 of the book Beautiful Code, here presented as a tutorial at the School of Haskell.

Links: Online tutorial; Beautiful Code

Screenshot of web page

Leave a Reply

%d bloggers like this: