Angelika Langer - Training & Consulting
HOME | COURSES | TALKS | ARTICLES | GENERICS | LAMBDAS | IOSTREAMS | ABOUT | CONTACT | Twitter | Lanyrd | Linkedin
HOME 


  UPCOMING
  PREVIOUS
  MATERIALS
 
GENERICS 
LAMBDAS 
IOSTREAMS 
ABOUT 
CONTACT 
The Java Memory Modell in Depth - Workshop

The Java Memory Modell in Depth - Workshop  
ABSTRACT
 
 
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 misconeptions, the workshop discusses the Java Memory Model comprehensively and in depth.

Java develeopers 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.

Content

  • Java memory model
  • Visibility, atomicity, reordering
  • Garantees for volatile 
  • Double-checked locking
  • Initialisation safety of final fields
  • Safe object sharing
  • Atomic variables
  • 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.

     
    PREREQUISITES

     
    Level: average to advanced
    Duration: half or full day
    Audience: Java developers who develop multi-thread software and want to prepare their programs for use on multi-cpu platforms.  Java developers with an interest in performance optimizations.  Java developers with an interest in concurrent programming in general who want to brush up their knowledge.
    Prerequisites: Working knowledge of Java concurrency.
    System Prerequisites: Notebook/PC with an installation of Java 6 SE. An installation of the test tool ConTest is recommended; the tool is availab le for download at http://www.alphaworks.ibm.com/tech/contest/download .
    Presented at: Experten Forum Stuttgart 2008 , Stuttgart, Germany, July 4, 2008
    Entwickler-Tage , München, Germany, November 10-14, 2008
    JSF Days 2009 , Vienna, Austria, April 1-3, 2009
    JAX 2009 , Mainz, Germany, April 20-24, 2009
    Workshop Tage 2009 , Zürich, Switzerland, September 8-10,2009
    Entwickler-Tage , München, Germany, November 23-27, 2009
    JSF Days 2010 , Vienna, Austria, February 23-25, 2010
    ACCU Conference 2011 , Oxford, UK, April 22-25, 2011
     

    Weiterführende Informationen:
    Seminars
     
    Concurrent Java
    4-tägiges Seminar (open enrollment / on-site)
    JMM - Java Memory Model
    1-tägiges Seminar (open enrollment / on-site)
     
    Papers
     
    online FAQ EFFECTIVE JAVA on Concurrency
    Column in JavaMagazin 
    (available in German only)
    online FAQ EFFECTIVE JAVA on JMM
    Column in JavaMagazin
    (available in German only)
     
    Video
     
    JAX TV
    Java-Programmierung im Multicore-Zeitalter
    (available in German only)
     
      © Copyright 1995-2011 by Angelika Langer.  All Rights Reserved.    URL: < http://www.AngelikaLanger.com/Conferences/Abstracts/JMM-Workshop.htm  last update: 9 Dec 2011