I'm trying to understand Java internals about their scheduling and thread affinity.
The question is:
given an infinite loop, running on a thread as such in a multicore environment (e.g. 8):
while(true) Thread.sleep(1000);
Will this operation always run on the same physical thread or not?
Is there some kind of affinity?
If it doesn't always run on the same CPU, how does the JVM decide to actually switch the execution to a new CPU?
Any way to verify this behavior?