Effective
Concurrency
November 9-12, 2009
Bellevue, WA, USA
I'll
cover the following topics:
Fundamentals: Define basic concurrency
goals and requirements • Understand applications’ scalability needs • Key
concurrency patterns
Isolation -- Keep work separate: Running
tasks in isolation and communicate via async messages • Integrating multiple
messaging systems, including GUIs and sockets • Building responsive
applications using background workers • Threads vs. thread pools
Scalability -- Re-enable the Free Lunch:
When and how to use more cores • Exploiting parallelism in algorithms •
Exploiting parallelism in data structures • Breaking the scalability barrier
Consistency -- Don’t Corrupt Shared State:
The many pitfalls of locks--deadlock, convoys, etc. • Locking best practices
• Reducing the need for locking shared data • Safe lock-free coding patterns
• Avoiding the pitfalls of general lock-free coding • Races and race-related
effects
High Performance Concurrency: Machine
architecture and concurrency • Costs of fundamental operations, including
locks, context switches, and system calls • Memory and cache effects • Data
structures that support and undermine concurrency • Enabling linear and
superlinear scaling
Migrating Existing Code Bases to Use Concurrency
Near-Future Tools and Features
Machine Architecture: Things Your Programming Language Never Told You
(Google video) (pdf slides)
September 19, 2007
Northwest C++ Users Group,
Seattle, Washington, USA
Programmers are routinely surprised at what simple code actually does and how expensive it can be, because so many of us are unaware of the increasing complexity of the machine on which the program actually runs. This talk examines the “real meanings” and “true costs” of the code we write and run especially on commodity and server systems, by delving into the performance effects of bandwidth vs. latency limitations, the ever-deepening memory hierarchy, the changing costs arising from the hardware concurrency explosion, memory model effects all the way from the compiler to the CPU to the chipset to the cache, and more -- and what you can do about them.