Do process switch between different cores

cachecpucpu-architecturecpu-cache

Will a process switch between different cores to increase performance? If the process does jump between cores, which components are shared across cores? L1-L3 cache, registers or memory?

Best Answer

  • Let's imagine a busy single CPU with 2 cores system, where the load is nearing 100%.

    A process with PID 1234 has only one thread (e.g. console application doing monothread audio compression).

    For this kind of process, the system will try its best to run the thread on the same core, to minimize cache faults. However, if the system is really busy, similar other processes may also try to run on the same cores. In this case, in principle, your single thread process may run first on core #1, then on core #2, and so on and so forth.