Lecture 8: Concurrency

Title slide

Slides : Recording

Moving on from type systems, today’s lecture started to look at programming for concurrency: why you might want — or need — to write concurrent code and some of the challenges in doing so. I also introduced some of the concurrency primitives in Java and how they are used, as well as telling a story about the Apollo Guidance Computer and the robustness of its concurrent event handling under input overload.

Links: Slides from Lecture 8; Recording of Lecture 8

Homework
1. Do This

Find out what a data race is. What happens to C or C++ code that contains a data race?

2. Read this

Work through the first three sections of the Java Concurrency Tutorial.

Look for other tutorials on Java concurrency — there are many. If you find one you think good then post on Piazza or mail me.

References

Quite a lot this time. I used the following pieces as sources for some of the images and ideas in the lecture slides.

The first of these picks up a thread of research over the years observing some hardware trends and their impact on the need for concurrent programming. The second explores in great detail on just how extensive that impact is and the wide range of concurrency that’s involved.

These contrasting talks argue for and against threads or events being a good model for programming concurrent systems.

Margaret Hamilton is a software engineer who was lead developer for the Apollo flight software. The following fairly sedate NASA announcement and rather more effusive magazine articles describe some of her achievements in a lifetime of professional computing.

Barack Obama awarded Margaret Hamilton the US Presidential Medal of Freedom in 2016: among the 21 medals was one other for a computer scientist, Grace Hopper. Bill and Melinda Gates were there too, but for their foundation’s impact on global healthcare rather than computing.

You can now view on GitHub the code for the Apollo Guidance Computer written by Hamilton’s team.

You can also run it in a web page, a stand-alone emulator, or to fly a virtual spacecraft (some assembly required).

Margaret Hamilton appears in the LEGO Women of NASA set, originally a fan-proposed set that after gathering 10,000 public votes in just two weeks was further developed promoted to the production line as a regular model.

Leave a Reply

%d bloggers like this: