This is a presentation on the topic of the broken Double-Checked Locking Pattern and memory barriers. I got started on this line of inquiry after using the Double-Checked Locking Pattern for years in my embedded work, and then installing a Pentium 4 server with Hyperthreading. It got me to wondering how much trouble I was in. I had used memory barrier instructions on the Power PC before, but until recently had not really appreciated the issues for threads when writing in C++, C, or Java. The presentation is available as a PDF file.
