Question: I was just trying to get a clearer understanding of what exactly multiple cores are being used for, and what the difference is between multiple cores and multiple CPUs.

I was trying to understand if having multiple cores is just to enable instruction-level parallelism within a given CPU, or if the multiple cores within a CPU all have their own struct rq that lets them independently call \_\_schedule() and schedule processes/threads at will, and that instruction-level parallelism is then handled by additional modules *within* each core.

Any thoughts appreciated.

Answer: 
ILP is purely within each physical core separately.  

cross-site duplicate: [How does a single thread run on multiple cores?](https://softwareengineering.stackexchange.com/questions/349972/how-does-a-single-thread-run-on-multiple-cores/350024#350024)  

(It doesn't - each core has multiple execution units and a wide front-end.
Read my linked answer for details that I'm not going to duplicate. See also [Modern Microprocessors
A 90-Minute Guide!](http://www.lighterra.com/papers/modernmicroprocessors/))

Also, real CPU cores can pretend to be multiple "logical cores" (i.e. each having register context and can call `__schedule()` independently). Generically, this is [SMT](https://en.wikipedia.org/wiki/Simultaneous_multithreading); the mostly widely-known brand-name implementation of that concept is Intel's HyperThreading. Letting multiple software threads share a CPU truly simultaneously (not via software context-switching) gives the core two instruction-streams to find parallelism between as well as within, generally increasing overall throughput (at the cost of single-thread performance to some degree, depending on how busy a single thread of your workload could keep a core).

---

**In some contexts, "CPU" is synonym for a single core**. e.g. `perf stat` output saying "7.5 CPUs utilized".

**But more often, a CPU refers to the whole physical package**, e.g. my CPU is a quad-core, an i7-6700k. Server motherboards are often dual-socket, allowing you to plug in two separate multi-core CPUs.

Perhaps that's what created some terminology confusion?
> 
> what the difference is between multiple cores and multiple CPUs
> 
> 
> 

Mulitple cores are on one piece of silicon and mulitple CPUs are on different pieces of silicon. That's pretty much the only difference between multiple cores and multiple CPUs.

Generally the term "core" is more precise these days -- it means the same thing as the original definition of CPU: the Central Processing Unit of the Von Neumann architecture model. Over time, however, the term CPU has been (ab)used by marketing to mean all the things on a single piece of silicon or in a single physical package, even when that is more that one CPU/core.

When talking about software, things become even more imprecise, as you may have mulitple "logical" or "virtual" CPUs running on a single physical CPU. The term core here generally still remains more precise, referring to the physical device, though when dealing with virtual machines you may see references to "virtual cores".