Concurrency & Parallelism Etc.
CPU Related Concepts
| Item | Concept | Related Concepts |
|---|---|---|
| Number of CPUs | The number of CPUs installed in a computer | Multiprocessor system |
| Number of CPU cores (physical cores) | A CPU can contain multiple dies, and each die can contain multiple cores. The number of cores is the CPU core count | Wafer, die, core, CPU |
| Number of CPU threads (logical cores) | Intel’s Hyper-Threading technology allows one core to execute multiple threads at the same time. 8 cores and 16 threads means one core can run two threads, for a total of 16 threads | Hyper-Threading |
Understanding the relationship between wafer, die, and CPU - Juejin
A Simple Understanding of CPU physical count, cores, threads, processes, threads, coroutines, concurrency, and parallelism - Zhihu
OS Related Concepts
- Process: the basic unit by which the operating system allocates and manages resources. The OS can allocate resources such as CPU time and memory according to each process’s needs and priority.
- Thread: the basic unit of CPU scheduling and resource allocation. In a multithreaded OS, a thread is the basic unit that runs independently, so it is also the basic unit scheduled and allocated independently.
Concurrency & Parallelism
| Definition | Diagram | |
|---|---|---|
| Parallelism | Multiple computational tasks execute at the same physical moment | |
| Concurrency | Multiple computational tasks make progress within the same time period |
The diagram below shows how single-core and multi-core CPUs support concurrency and parallelism. Parallelism requires hardware support; a single-core CPU can only provide concurrency.

The two are not opposites. For I/O-intensive tasks, when a process or thread is blocked on I/O, the CPU can be assigned to a ready process or thread to avoid sitting idle. Multi-core CPUs also need this strategy to improve CPU utilization.



