All Questions
Dealing With Contention easy

Why does adding more threads sometimes *decrease* performance?

  1. A It doesn't. More threads is always faster.
  2. B Due to Context Switching overhead and Lock Contention (threads spending more time waiting for locks than working).
  3. C Electricity cost.
  4. D The CPU gets confused.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions