lunduniversity.lu.se

Software Development and Environments

Computer Science | Faculty of Engineering, LTH

Denna sida på svenska This page in English

Advanced concurrent programming in Java

Description

The course covers the new concurrency features in Java 5, 6, and 7 and with a brief introduction to lock-free algorithms. The course is aimed at PhD students writing concurrent Java code in their PhD projects.

A sequel course is planned that will cover lock-free algorithms in more detail, based on the book by Herlihy & Shavit below.

Administrative details

  • Course leader: Görel Hedin, gorel.hedin AT cs.lth.se
  • Credits: 7.5 hp
  • When: Fall 2013
  • The number of PhD student participants is limited to around 10. Other faculty is welcome to attend the seminars.
  • Prerequisites: Proficiency in sequential Java. Basics of concurrent programming (like EDA040).
  • Course code: EDA015F, official course plan

Literature

Textbook: [Book] Brian Goetz et al: Java: Concurrency in Practice. Addison-Welsey 2006. ISBN: 0321349601 (adlibris entry, addison-wesley entry. This book covers the concurrency mechanisms up to Java 5. In Java 7, the fork-join framework was added, for which we will use the blog articles below.

Articles and book excerpts:

Form

The course is given as a series of seminars:

  • At each seminar, a number of chapters and/or papers will be presented by some of the students.
  • All students should have read these chapters/papers in advance.
  • Between seminars, participants do programming exercises, devised by the presenters.
  • The last seminar is different: Here each participant presents a paper of his/her own choice. These papers do not have to be read in advance by the other participants.

Course requirements

  • Presentation of two chapters at two of the seminars 2-6. For each of these two presentations:
    • Prepare a talk of 10-15 minutes, explaining the main concepts and terminology, and giving examples. Provide readable informative slides.
    • Provide exercises in the form of questions and simple programming exercises for the topics covered in your chapter. It should be possible to complete the these exercises within 1-2 hours. You may also add optional exercises that are more difficult. Email the slides and the exercises to Görel, as two pdf files, the same day as the presentation at the latest. They will be uploaded and accessible from this page.
    • Correct exercise solutions from all participants. You will receive them two days before the next seminar at the latest.
    • If relevant, prepare a brief discussion about the solutions for the next seminar.
    • Total estimated time for this part: 2x2.5 days.
  • Read all the material covered in seminars 2-6. You should have read through all the material related to a given seminar before that seminar. Estimated time: 5x1.5 days
  • Do the exercises relating to seminars 2-6. You should have completed the exercises, and emailed your solutions to the participant who created them, at least two days before the next seminar. Estimated time: 5x1 days
  • At seminar 7, present one article of your own choice, related to the course. Provide readable informative slides for the article. Email the slides to all participants the same day at the latest. Estimated time: 2.5 days
  • Participate actively at (almost) all seminars. Estimated time: 7x0.5 days

Mailinglist

eda015f-2013 AT listserver.lu.se

Schedule

NB! Links to presentations and exercises will be uploaded shortly after the presentations. Until then they will give 404 errors. If the exercises file is missing, it might be that the exercises are at the end of the presentation file. If you still get the 404 error when you think the material should be there, try reloading the page.

Tuesday
Oct 8
13:15-15:00
Room: E:2116
Introductory meeting. Decide on dates, and who presents what.
SeminarChapter in Goetz bookPresenting participant
(add "AT cs.lth.se" if
no domain is stated)
Monday
Oct 21
15:15-18:00
Room: E:2116
Ch 1: Intro + Ch 2: Thread Safety
presentationexercises
gustav.cedersjo
Ch 3: Sharing Objects
presentation and exercises
mehmet_ali.arslan
Ch 4: Composing Objects
presentation and exercises
jesper.oqvist
Ch 5: Building Blocks
presentation and exercises
yang AT control.lth.se
Thursday
Nov 14
15:15-18:00
Room: E:2116
Ch 6: Task Execution
presentationexercises
alma.orucevic-alagic
Ch 7: Cancellation and Shutdown
presentationexercises
alfred.theorin AT control.lth.se
Ch 8: Applying Thread Pools
presentation and exercisesRayTracer.rar
magnus.andersson
Ch 9: GUI Applications
presentation and exercisesCh9-IsItFika.java
niklas.fors
Atomic construct based on STM (Harris)
presentation and exercises
patrik.persson
Thursday
Nov 21
15:15-18:00
Room: E:2116
Ch 10: Avoiding Liveness Hazards
presentationexercises
jesper.pedersen_notander
Ch 11: Performance and Scalability
presentationexercises
gustav.cedersjo
Ch 12: Testing Concurrent Programs
presentationexercises
bjorn_a.johnsson
Fork-Join framework (Goetz part 1 and 2 + Ponge)
presentation and exercises
mehmet_ali.arslan
The Akka framework, part 1 (Haines + Heiss)
presentation and exercises
usman_mazhar.mirza
Thursday
Nov 28
15:15-18:00
Room: E:2116
Ch 13: Explicit Locks
presentationexercises
alma.orucevic-alagic
Ch 14: Building Custom Synchronizers
presentationexercises
alfred.theorin AT control.lth.se
Ch 15: Atomic Variables and Nonblocking Synch
presentationexercises
yang AT control.lth.se
Ch 16: The Java Memory Model
presentation and exercises
jesper.oqvist
The Akka framework, part 2 (Akka Java documentation)
presentationexercises (delayed)
usman_mazhar.mirza
Herlihy Ch 9. Linked Lists: The Role of Locking
Thursday
Dec 5
15:15-18:00
Room: E:2116
9.1-9.3: Intro, Lists, Concurrent Reasoning
presentationexercises
magnus.andersson
9.4-9.5: Coarse and Fine-Grained Synchronization
presentationexercises
niklas.fors
9.6-9.7: Optimistic and Lazy Synchronization
presentation and exercises
jesper.pedersen_notander
9.8-9.11: Non-blocking Synch + Discussion + Notes
presentationexercises
bjorn_a.johnsson
Software Transactional Memory framework (Korland)
presentation and exercisesAtomicAccount.java
patrik.persson
Tuesday
Dec 17
13:15-17:00
Room: E:2116
ArticlesAll

Articles

The articles below are just suggestions. Please feel free to find other interesting articles on your own.

ArticlePresenter
Atomic transactions
Dan Grossman. The transactional memory / garbage collection analogy. OOPSLA 2007. http://doi.acm.org/10.1145/1297027.1297080Patrik Persson
Joao Cachopo, Antonioi Rito-Silva. Versioned Boxes as the basis for memory transactions. SCP 2006. http://dx.doi.org/10.1016/j.scico.2006.05.009
Benjamin Hindman, Dan Grossman. Atomicity via Source-to-Source Translation. MSPC 2006. http://dx.doi.org/10.1145/1178597.1178611
Cormac Flanagan and Shaz Qadeer. A Type and Effect System for Atomicity. PLDI 2003. http://doi.acm.org/10.1145/781131.781169
Model checking
Klaus Havelund, Thomas Pressburger. Model checking Java programs using Java PathFinder. STTT 2000. http://dx.doi.org/10.1007/s100090050043. See also tutorials at http://babelfish.arc.nasa.gov/trac/jpf/wiki/presentations/startYang Xu
Beta, Coroutines
Ole Lehrmann Madsen. Building Safe Concurrency Abstractions. Draft. To appear in Festschrift for Akinori Yonezawa. Contact Görel for a copy. Niklas Fors
Composing concurrency
Aaron Turon. Reagents: Expressing and Composing Fine-grained Concurrency. PLDI 2012. http://dl.acm.org/citation.cfm?id=2254084(alternative pdf)Mehmet Ali Arslan
Safety through type checking
Christian Grothoff, Jens Palsberg, Jan Vitek. Encapsulating Objects with Confined Types. OOPSLA 2001. http://doi.acm.org/10.1145/504282.504300
Chris Andreae, James Noble, Shane Markstrum, Todd Millstein. A framework for implementing pluggable type systems. OOPSLA 2006. http://doi.acm.org/10.1145/1167473.1167479Jesper Pedersen Notander
Chandrasekhar Boyapati, Robert Lee, Martin Rinard. Ownership Types for Safe Programming: Preventing Data Races and Deadlocks. OOPSLA 2002. http://doi.acm.org/10.1145/582419.582440
Mandana Vaziri, Frank Tip, Julian Dolby. Associating synchronization constraints with data in an object-oriented language. POPL 2006. http://doi.acm.org/10.1145/1111037.1111067
M. S. Tschantz and M. D. Ernst. Javari: Adding reference immutability to Java. OOPSLA 2005. http://doi.acm.org/10.1145/1094811.1094828
Refactoring
Max Schäfer, Julian Dolby, Manu Sridharan, Emina Torlak, Frank Tip. Correct Refactoring of Concurrent Java Code. ECOOP 2010. http://dx.doi.org/10.1007/978-3-642-14107-2_11Alfred Theorin
Debugging and testing
Madanlal Musuvathi, Shaz Qadeer, Tom Ball, Gerard Basler, Piramanayakam Arumuga Nainar, and Iulian Neamtiu. Finding and Reproducing Heisenbugs in Concurrent Programs. OSDI 2008. http://research.microsoft.com/apps/pubs/default.aspx?id=77961Magnus Andersson
Arkady Bron, Eitan Farchi, Yonit Magid, Yarden Nir, Shmuel Ur. Applications of synchronization coverage. PPoPP 2005. http://dl.acm.org/citation.cfm?doid=1065944.1065972
Mandanlal Musuvathi, Sebastian Burckhardt, Pravesh Kothari, Santosh Nagarakatte. A Randomized Scheduler with Probabilistic Guarantees of Finding Bugs. ASPLOS 2010. http://research.microsoft.com/apps/pubs/default.aspx?id=118655Björn A. Johnsson
Tongping Liu, Charlie Curtsinger, Emery D. Berger. Dthreads: Efficient and Deterministic Multithreading. SOSP 2011. http://doi.acm.org/10.1145/2043556.2043587
Miscellaneous
Joe Armstrong. A history of Erlang. HOPL 2007. http://dx.doi.org/10.1145/1238844.1238850. See also: Joe Armstrong, Robert Virding, Claes Wikström, Mike Williams. Concurrent programming in Erlang. Prentice Hall, 2nd edition, 1996, http://www.erlang.se/publications/erlang-book-part1.pdf. See also: Joe Armstrong. Programming Erlang. Software for a Concurrent World. Excerpts: Introduction, Introducing Concurrency
Jeffrey Dean and Sanjay Ghemawat. MapReduce: Simplified Data Processing on Large Clusters. OSDI 2004Alma Orucevic-Alagic
Philippe Charles et al. X10: An Object-Oriented Approach to Non-Uniform Cluster Computing. OOPSLA 2005. http://dl.acm.org/citation.cfm?id=1094852Usman Mazhar Mirza
Akihiro Hayashi, Max Grossman, Jisheng Zhao, Jun Shirako, and Vivek Sarkar. Speculative Execution of Parallel Programs with Precise Exception Semantics on GPUs. LCPC 2013. https://parasol.tamu.edu/lcpc2013/papers/lcpc2013_submission_37.pdf .Jesper Öqvist
Classics
C. A. R. Hoare. Communicating Sequential Processes. CACM 1978. http://dl.acm.org/citation.cfm?id=359585 . See also http://ro.uow.edu.au/compsciwp/8/Gustav Cedersjö