Question

I've read somewhere that real multi-threading is limited to the number of CPU cores you are running. Does that mean that all you get if you have, say, a dual core CPU, is real multi-threading with just... 2 parallel threads?

Was it helpful?

Solution

Yes, it essentially means that at most 2 threads can run in parallel. Intel processors implement HyperThreading where a single core acts as two cores and can run two threads (mostly) in parallel so in this case you would end up with maximally 2*2=4 concurrent threads, but most OSes distinguish HT cores and handle a DualCore HT as if it had 4 cores. But all this meditation is useless. For performance aspects there is much more to consider than the sheer number of cores. For parallelism as a problem there are multitasking operating systems which simulate large number of parallel threads even on one core. These simulations are perfect in the sense that they can hit cases where any problem/benefit of real parallelism is observable.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top