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.
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.
Quite a lot this time. I used the following pieces as sources for some of the images and ideas in the lecture slides.
Karl Rupp 42 Years of Microprocessor Trend Data.. Blog post, February 2018.
Herb Sutter. Welcome to the Jungle. Sutter’s Mill (blog), 2012.
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.
John Ousterhout. Why Threads are a Bad Idea (for most purposes). Invited talk at USENIX 1996 Technical Conference, January 1996.
Rob von Behren, Jeremy Condit and Eric Brewer. Why Events Are A Bad Idea (for high-concurrency servers). Paper at HotOS IX: The 9th Workshop on Hot Topics in Operating Systems, May 2003.
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.
NASA Honors Apollo Engineer. NASA, September 2003.
Lily Rothman. Remembering the Apollo 11 Moon Landing With the Woman Who Made It Happen. TIME Magazine, July 2015.
Dylan Matthews. Meet Margaret Hamilton, the badass ’60s programmer who saved the moon landing. Vox, July 2015.
Robert McMillan. Her Code Got Humans on the Moon — And Invented Software Itself. Wired, October 2015.
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.
President Obama Names Recipients of the Presidential Medal of Freedom. Office of the Press Secretary, The White House. November 2016.
Honour for software writer on Apollo moon mission. BBC News. November 2016.
You can now view on GitHub the code for the Apollo Guidance Computer written by Hamilton’s team.
Keith Collins. The code that took America to the moon was just published to GitHub, and it’s like a 1960s time capsule. Quartz, July 2016.
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.