Tutorial T1: Lock-Free Programming in Ada-2022: Implementing a work-stealing scheduler for Ada-2022's light-weight parallelism

S. Tucker Taft, AdaCore

This tutorial will introduce the attendee to the use of the new packages in the System.Atomic_Operations subsystem for lock-free programming in Ada, as well as the concept of a work-stealing scheduler for light-weight threads. We will review the implementation of an efficient double-ended queue (deque) for a work-stealing scheduler using the features of the Atomic_Operations subsystem, and investigate some of the tradeoffs when using lock-free data structures. Finally, we will experiment with the work-stealing scheduler, to understand some of the subtleties of Ada 2022's light-weight parallelism features and how best to use work-stealing to support them.

Duration: half-day

Level: Intermediate to Advanced programming in Ada

Reason for attending

  • Gain exposure to lock-free primitives and how they can be used to implement efficient lock-free data structures.
  • Build an understanding of the scheduling challenges for light-weight threads, and some of the practicalities of creating efficient parallel programs.

Presenter

S. Tucker Taft has been the Director of Language Research at AdaCore since 2011. Prior to that Tucker was founder and lead engineer at SofCheck for nine years, and a language designer and compiler engineer for 22 years at Intermetrics and its follow-ons. Tucker was the technical lead for the project that developed Ada 95, and has been a member of the Ada Rapporteur Group which developed Ada 2005, Ada 2012, and Ada 2022. Tucker is also the designer and implementor of the ParaSail parallel programming language.