0

A friend of mine says that a process always jumps between cores even if you pin a process to a specific core within operating system. He says that the processor manufacturers do this so that the processors won't burn due to hotspots (burning of cores actually happening or not is besides the point).

He also says, for example windows task manager is not correct as it can't follow what processor does internally. Therefore untrustworthy... He swears that he saw some Intel documentation which explains it. (well he could not find it)

I tried to tell him that this is illogical as doing so would invalidate caches and pipelines etc. but as there is also no documentation saying otherwise it is kind of difficult to prove.

Does anybody know documentation or can make a bulletproof explanation which proves either theory?

Thanks!

yurtesen
  • 451

1 Answers1

1

I don't think there is deliberate "randomization" done in the processor to avoid heat spots or whatever.

Ring 0 code can read CPU registers to identify which core the code is running on, and can then give up it's CPU time if it's on the wrong core. At the very minimum, one core always has the BSP bootstrap flag set during reset at BIOS initialization (we're talking about an x86 CPU). You can read that register to ensure you only run on that core. But there's almost certainly some other ID mechanism that can be used.

Since the OS privileged kernel code handles process switching, you could definitely give the OS a feature to lock processes onto a specific core, even if that just means giving up CPU time until the switch lands on that core. You could also set all other processes to avoid that core to keep it open for the process you want.

So whether task manager does it or not, you can in theory definitely know which core which process is running on, and lock them to those cores.

Now, does Intel have hidden hardware that's actually switching the ID's of cores around so you don't know which physical core you're actually running on? Doubt it. The CPU reports per-core temperatures, and you can see the temperature rising on different cores using a single threaded process that you lock to different cores.