Lecture 2: Concurrency

24 September 2010

Concurrency: motivations for concurrent code; Amdahl’s law and the opportunity for language design. Challenges with concurrent code, including liveness, fairness, scalability. Threads and processes. Java Thread basics. The need for mutual exclusion. Monitors in Java: locks and synchronize, condition variables with wait() and notify().

Link: Slides


Try the exercise given at the end of the lecture slides. Sun’s tutorial on concurrency gives an introduction to the concurrency facilities provided in Java. Experimentation is essential: try the exercise and tutorial examples inside Netbeans or Eclipse and investigate the facilities for debugging concurrent code.

If you have any thoughts, problems or interesting pointers, please comment here!

Coursework Assignment

24 September 2010

The assessed coursework for APL is to research and write a report on one of the following topics:

  • Information flow in Jif
  • Programming the web with Links
  • Parallel programming in Haskell with par and seq
  • Asynchronous workflows in F#
  • Functional reactive programming in Flapjax

Preparing your report will involve reading research papers, technical manuals, and some code development on the system in question. Further details are available from the coursework webpage, including some examples of previous reports.

The lecture next Friday will review the assignment topics, and give information on preparing your report, its content and arrangement.


Do some basic research into each of the topics, in preparation for next Friday. Find out what you can, and consider which one most interests you. The lecture on Friday is a chance ask further questions about the topics, and any other issues that concern you. You can also post questions here on the blog, or by email to the lecturers.

Link: Coursework instructions