Multicore & Synchronization
Which is NOT a reason a parallel program fails to scale as cores are added?
- AFrequent synchronization between threads, such as lock waits
- BLarge imbalance in the amount of work per thread
- CEach thread reads and writes only its own private data
Show answer and explanation
Answer: C. Each thread reads and writes only its own private data
The main obstacles to parallel speedup include parts that cannot be parallelized (Amdahl's law), waits on locks and barriers, cache lines bouncing due to shared data or false sharing, load imbalance and insufficient memory bandwidth. If each thread works only on its own private data, there is no communication or waiting with other threads, which approaches ideal parallel scaling.
- A. Synchronization waits are a classic scaling limit.
- B. Imbalance creates time spent waiting for slow threads.
- C. Correct. Private data alone does not hinder scaling.