Explore the intricacies of the Java Memory Model in this 46-minute conference talk by Andrzej Czarny at Devoxx. Delve into the complexities of multi-thread programming, focusing on how threads interact through memory and the allowed behaviors in concurrent execution. Learn about mutual exclusion, the synchronized keyword, and the often-overlooked aspect of memory visibility. Gain practical insights through numerous examples and discover how to validate results using the OpenJDK Java Concurrency Stress tests framework (JCStress). Cover topics such as compiler optimization, hardware considerations, strong memory models, creating custom tests, reordering, general memory models, synchronization, threadsafe immutable objects, static limits, and volatile keywords.
Overview
Syllabus
Introduction
Agenda
Compiler optimization
Textbook example
Demo
Hardware
Strong Memory Model
JZStress
Creating your own tests
Only reordering test
General memory model
What is Memory Model
Order
Synchronization
Threadsafe immutable objects
Static limit
Escape
Volatile
Taught by
Devoxx