CPUs as a Coffee Shop

  • CPUs can have many cores
    • Each core can one or two threads

Imagine a coffee shop:

  • Each espresso machine is one core
  • Each thread is a barista working together on that machine

Adding more espresso machines adds a lot of throughput as drinks can now be made faster. Adding another person to each machine maybe be able to decrease downtime, but the two baristas may get in each others’ way.

  • The optimal number of cores or threads for a given operation can depend on the operation itself