Computer Science Department

Computer Science Department

Getting C++ threads right
Hans Boehm
Senior Research Scientist
HP Labs
Nov. 16, 3 PM, McGl 020

The advent of multicore processors has generated profound debate on the merits of writing parallel programs with threads and locks. Nonetheless, for many application domains, this remains the standard paradigm for writing parallel programs, and at the moment, there is no apparent universal replacement. And it is the focus of this talk.

Somewhat surprisingly, there are a number of often subtle, but generally fixable, industry-wide problems with current approaches to threads programming. We will focus on probably the most widely used environments, consisting of C or C++ with a standard threads library. Problems span the spectrum from system libraries through language implementations through supporting hardware. They get in the way both in that they often make it difficult to write 100% reliable multi-threaded software, and in that they confuse even the basics of the programming model, thus making it hard to teach. A surprising number of "experts" do not understand the basic rules. Arguably, these problems really need to be addressed to even allow a meaningful comparison to other parallel programming approaches.

Since solutions to these problems generally require a coordinated industry effort, we helped to persuade the C++ standards committee to address them by pursuing a coherent approach to threads in the next C++ standard. The talk will outline some of the proposed solutions, and give an update on this effort.

Biography
Hans Boehm is the primary author of a widely used garbage collector library. He was HPs representative to the recently completed effort to repair the Java "memory model", and is driving an ongoing effort to extend the C++ standard with clean semantics for threads, and particularly shared variable accesses. He holds a Ph.D. from Cornell University, has published a number of influential papers on garbage collection, and a few on threads and synchronization. He is a past Chair of ACM SIGPLAN, and of the POPL, ISMM and VEE research symposia. He was awarded the 2003 PLDI most influential paper award, and the 2006 SIGPLAN Distinguished Service Award, and is an ACM Distinguished Scientist.