I'm trying to understand how multi-core system, and how to program effective programs for systems with many cores . I know this is a very difficult topic, but I really need the fastest solutions.
First of all, I'm trying to understand how multithreading works. Obviously, in most cases, multithreading can dramatically increase performance. According to this page , this is how multithreading works:
But why is switching between N threads faster than just N threads one at a time? How does streaming work with a system with only one processor?
, ? , , ? 8 4 ?
(cpu_affinity) / ? 4 pthread_create 4 ?
hyper-threading ? CPU cache ?
, MySQL, , ?
, //// Linux ( C).
, , , .
N N - , , . N , , , , . , CPU , - .
, . , , . hyper-threading .
, . , ββ , - . (, , , ..). , 10-15%. , , ..
CPU , , . , ping-ponging.