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

  GENERAL INFO
  SCHEDULE
  REGISTRATION
  
  JAVA
    EFFECTIVE JAVA
    CONCURRENCY
    PERFORMANCE
    LAMBDAS
    JAVA AFTER EIGHT
    MODULE SYSTEM
    GC TUNING
    MEMORY MODEL 
    JAVA INTRO

  C++
    RELIABLE C++
    EFFECTIVE STL
    TEMPLATES
    IOSTREAMS
    C++ INTRO   
 

GENERICS 
LAMBDAS 
IOSTREAMS 
ABOUT 
CONTACT 
Concurrent Java

Concurrent Java
COURSE DESCRIPTION

" Writing correct programs is hard; writing correct concurrent programs is harder.  There are simply more things that can go wrong in a concurrent program than in a sequential one. "  (Brian Goetz)

Today, even the smallest computing devices run on at least two or four processors; server software is deployed to hardware with 8 or 16 cores, and the number of processors on each chip will continue to increase in the years to come. While we handle a couple or a few dozens of cores today, we will face the challenge of dealing with hundreds of cores in the future. As a result, single-threaded programs are a fossile of the past.  Concurrent Java programs with multiple threads are the norm and the expectations regarding performance and scalability are rising.

Not only are concurrent Java programs required to run in a predictible, stable and reliable fashion in a multi-core or multi-cpu environment, in addition concurrent Java programs are required to exhibit excellent runtime performance and scalabilty. Ideally they should adapt easily and automatically to increasingly powerful multi-processor hardware.

To meet these goals, Java programs must be thoughtfully engineered to run across multiple cores- The most common method Java programmers have for doing that is keeping track of individual threads and synchronizing access to shared data by means of locks.  Consequently, the seminar provides insights into management of multiple thread - individually or by means of various types of thread pools.  The course also discusses at length the traditional shared mutable state concurrency, i.e., synchronization via locks and thread safety, along with its issues such as deadlocks, starvation, etc.

The traditional synchronization via locks introduces various performance impediments.  For this reason, less expensive alternatives need to be considered; they are available via volatile and atomic variables.  In order to enable participants to optimize the performance of critical operations, the seminar covers the Java memory model and the guarantees it provides for volatile, final, and atomic variables, which are needed for developing lock-free algorithms. 

Recent additions to the JDK / JVM offer abstractions for modern concurrent programming styles beyond classic threads and thead pools: 

  • asynchronous result retrieval and reactive fluent programming (via the CompletableFuture API)
  • synchronous thread-per-task programming (via virtual threads).

  •  

     
     

    In essence, this is the most comprehensive seminar on Java concurrency.  It covers every aspect of concurrent programming in Java relevant to practicing Java programmers - from the fundamental problem of race conditions to the principles of lock-free programming.


     

    Prerequisite Courses 
    and Skills:
    Basic knowledge of Java (introductory course or equivalent practical experience). 
    Duration: 4 days (can be extended to 6 days)

    The course is for Java programmers who intend to build concurrent applications for multi-core or multi-cpu platforms.

    The most comprehensive and up-to-date Java Concurrency seminar world-wide. 

    While the excellent book "Java Concurrency in Practice" by Brian Goetz is recommended reading, the course not tied to the book.  The seminar existed long before "Java Concurrency in Practice"  was written, covers all of the book content, and goes beyond it.  Different from the book and in addition to it, the seminar provides in-depth coverage of the Java memory model (including hands-on labs) and explains the latest JDK concurrency extensions such as the fork-join framework, StampedLock, @Contended,  CompletableFuture (all including hands-on labs and performance benchmarks), virtual threads, and structured concurrency.
     

    OBJECTIVES
    Understand concurrency control issues in general
    Know the instruments available in Java
    Avoid common errors and pitfalls
    Understand concurrency control idioms

    The course is designed by Klaus Kreft & Angelika Langer and backed by years of experience in teaching and more than a decade of practical experience in industrial software development both in C++ and Java.
    Angelika Langer is a freelance trainer/consultant in the area of software development in C++ and Java, author of language reference material such as the Java Generics FAQs [ ], the Lambdas/Streams Tutorial & Reference  [ ], and countless articles on C++ and Java topics [ ]. 
    Klaus Kreft is a senior consultant for more than 30 years and has served as the lead architect and performance expert on several successful industry projects. He has been working in Java since its advent in 1995. 
    Both are recognized speakers at OO and Java conferences and author of numerous articles on C++ and Java topics in various computer magazines worldwide. Together they write a column for the German Java magazine JavaMagazin  [ ] and are authors of the  books "Standard C++ IOStreams and Locales" (2000) [ ] and "Java Core Programmierung" (2011) [ ], the Online FAQ on Java Generics [ ], and the Lambdas/Streams Tutorial & Reference  [ ].


     

    COURSE OVERVIEW

    Multi-Threading Basics
    • Synchronization Basics
    • Thread Safety
    • Thread Creation
    Concurrency Control
    • Design Issues: Shared Mutable State & Synchronization 
    • Synchronization
      • Implicit and Explicit Locks
      • Read-Write-Lock & Stamped Lock
    • State-Dependent Operations
      • Signals & Conditions
    • Synchronizers 
      • Blocking Queues & Deques
      • Semaphore & CountDownLatch
      • Barrier & Phaser
    • Collections
      • Synchronized Collections
      • Concurrent Collections
    • Thread-Local Memory
    • Atomic Scalars & Accumulators
    Testing Concurrent Programs
    • Atomic Invariant Checks
    • Test for Liveness & Blocking State
    • Test for Thread Safety & Race Conditions
    • Tools, Harnesses, Analyzers
    Thread Control
    • Design Issues: 
      • Task Execution, Threads & Pools
    • Platform Threads
      • States, Groups, Priorities
      • Thread Interruption
      • Threads & Exceptions
    • Thread Pool Executor
      • Basics & Setup
      • Completion Service
      • Scheduled Tasks
      • Configuration
      • Shutdown
      • Customization
    • Fork-Join-Framework
      • Recursive Tasks
      • Principles & Basic Usage
      • Configuration
      • Managed Blocker
      • Internals & Performance
    • Completable Future
      • Asynchronous Result Retrieval
      • Reactive Fluent Programming
    • Virtual Threads
      • Synchronous Thread-Per-Task Programming
      • Scheduler & Continuation
      • Structured Concurrency
    Java Memory Model (JMM)
    • Memory Effects of Volatile Variables
    • Double Checked Locking
    • Initialization Safety of Final Fields
    • Atomic References
    • Lock-Free Programming
    FURTHER READING

    To get an impression of some of the topics covered in this course check out the sample materials: 
     
     
    EFFECTIVE JAVA
    Column in JavaMagazin 
    (available in German only)
    The Java Memory Model
    Conference Presentation at JavaZone 2011 (video)

     
     
     
    TRAINING LOCATIONS

    Open Enrollment
    Public courses are conducted in collaboration with partner companies worldwide. Presentation language is English or German, depending on the location. For further information go to GENERAL INFO.
    On-Site Training
    Courses can be held at your company site. Duration and content will be tailored to your specific needs and prerequisites. Presentation language is English or German.  For further information go to GENERAL INFO.
    For information regarding training locations and the current schedule of public courses go to SCHEDULE. For further information or enrollment send me EMAIL or use the REGISTRATION form.
    Schedule
    To check for availability, price and other details send me EMAIL or use the REGISTRATION form.
      © Copyright 1995-2022 by Angelika Langer.  All Rights Reserved.    URL: < http://www.AngelikaLanger.com/Courses/ConcurrentJava.htm  last update: 1 Aug 2022