Key Points

  • SMP is currently the dominant MP architecture. It consists of multiple symmetric processors connected via a single bus to a single memory system. The bus is the scalability weak link in the SMP architecture. Large caches, one per processor, are meant to keep bus contention under control.

  • Amdahl's Law puts an upper limit on the potential scalability of an application. The scalability is limited by portions of the computation that are serialized.

The trick to scalability is to reduce and, if possible, eliminate serialized code. Following are some steps you can take towards that goal:

  • Split a monolithic task into multiple subtasks that are conducive to parallel execution by concurrent threads.
  • Code motion. Critical sections should contain ...

Get Efficient C++ Performance Programming Techniques now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.