The increasing availability of multicore processors requires that essentially all Java applications must be multi-threaded in order to take advantage of those applications' cpu power. The transition from a single-core architecture to a multi-core or multi-cpu platform occasionally reveals bugs in the program: applications that worked properly and reliably in a single-core context suddenly and inexplicably exhibit errors in a multi-core context. Often this is due to the substantially more aggressive caching techniques used on the processor level in combination with misconceptions regarding the Java Memory Model on the programmer's side. In order to avoid such misconceptions, the workshop discusses the Java Memory Model comprehensively and in depth.
Java developers do not only need a proper understanding of the Java Memory Model. In addition, the elimination or at least reduction of sychronization is becoming increasingly important in a multi-core and multi-processor world. Using a multi-cpu platform users expect that an application should scale, that is, its performance should increase with the number of available cpus. This highly desirable effect does not occur automatically, but has to be built into the application. Sequential, i.e., non-parallel, parts of the program must be drastically reduced in order to utilize the multiple cpus effectively. There are several technique for reduction of sequential processing, among them the elimination of lock-based sychronization, but also the use of atomic operations and programming techniques such as lock-free programming.
The workshop discusses the Java Memory Model, the issues of visibilty and reordering, the use of volatile and atomic variable, the implementation of immutable types based on the memory model's initialization safety garantee, and provides an introduction to the techniques of lock-free programming. Since this is a workshop, participants will have opportunity to practice and apply the newly gained knowledge in hands-on labs. We will review code, spot bugs and fix them. In addition, we will use atomic variables to eleminate lock-based synchronisation. For the practice part, participants are asked to bring their notebooks.