合作交流 / 学术报告

Practical Concurrent and Parallel Programming

Title: Practical Concurrent and Parallel Programming
Speaker: Prof. Peter Sestoft
Time: 9th December 2014, 14:30 – 17:30
Venue: Seminar Room (334), Level 3, Building 5, Institute of Software, CAS
Abstract:
We recently designed and taught a new course on parallel programming at the IT University of Copenhagen, and will present the main insights and some highlights from that course.  The course uses the Java programming language throughout to illustrate concepts and solutions. This language is high-level enough to have a portable memory model, and low-level enough to illustrate hardware concepts such as compare-and-swap instructions and lock-free algorithms.  The course uses an experimental approach to assess performance and scalability, which varies widely between different algorithms and different hardware platforms.  What emerges is that functional programming, or at least wide use of immutable data, is good not only for correctness, but also for performance on manycore machines.
Mini-course contents:
1: Course motivation.  Focus on implementation in an industrially significant high-level language (Java) with garbage collection. Java threads, synchronization, locks, atomicity, visibility, the volatile and final modifiers, memory model.  Parallel programming for performance, tasks and executors, experiments and measurements.
2: Atomic objects, concurrent data structures, Java 8 parallel streams.  Lock striping, lock-free read access, the importance of immutability.  Case study: concurrent hash maps.  Scalability on multicore machines, the underlying cache coherence protocols.
3: Transactional memory, compositional atomicity, the Multiverse library, optimistic concurrency.  Lock-free data structures, compare-and-swap, Treiber stack, Michael-Scott queue, how to implement locks using compare-and-swap.