Course Abstract
This short course explains some pitfalls which typically occurs when Java-programs are being executed in a multicore environment. The course will explain the underlying reasons and devise some proper solutions using Java 8 parallel streams.
Topics Covered
We show how to use Java 8 streams and parallel array operations to solve various problems, and show how this allows for simple, safe and efficient parallelization on shared-memory multicore machines.
This is based in the stream, collector and array API of the Java 8 class library. We discuss some limitations of Java 8 streams compared to other high-level parallel programming frameworks. More technically, we dive below the API to see how that implementation can be so efficient, through a look at work-stealing queues, thread-locality and the hardware’s cache coherence protocols.
Prerequisites
Solid experience with Java similar to Java SE – Java Standard Edition 8 – Advanced and Java SE – Java Standard Edition 8 – Upgrade. Knowledge of functional programming, e.g. Java 8 lambda expressions, is preferable.
Target Audience
Experienced Java developers working with high performance systems.
Learning Objectives
- Optimize Java code to take advantage of multiple CPUs/cores
- Explain certain performance issues regarding parallelization