GeeCON 2025: Andrzej Grzesik, Jarosław Pałka – Delikatne wprowadzenie do programowania bez blokad w Javie

youtube.com 9 godzin temu


Are you curious about lock-free programming but only acquainted with utilizing locks in concurrent Java? This talk is for you! We'll make the concepts of lock-free programming approachable, starting with why it matters and the basics of advancement guarantees. You’ll learn to differentiate between wait-freedom, lock-freedom, and obstruction-freedom, knowing why these guarantees are crucial.

We’ll research essential lock-free programming idioms, like Compare-And-Swap (CAS) for atomic updates, markable references for efficient state management, and the sentinel node method for simplifying concurrent data structures.

The infamous ABA problem will be demystified—what it is, why it’s problematic, and how to tackle it with techniques like versioning. To see these concepts in action, we’ll implement 3 lock-free data structures in Java: a stack, a queue, and a linked list. These examples will item the applicable application of lock-free techniques and the challenges they address.

Finally, we’ll discuss performance characteristics, comparing the benefits and limitations of lock-free programming versus conventional locking. You’ll learn erstwhile to usage lock-free methods for better scalability and erstwhile sticking with locks might be more appropriate. Join us to elevate your concurrent programming skills and confidently start experimenting with lock-free programming in your Java projects!