we must migrate threads of busiest core to other core when load balancing.
which threads are migrated to other core ?
if we want to have a high cache hit ratio,we should migrate those threads which are not related to most of other threads.
but we how to characterize threads or how to know one thread which is not related to others?
I talk about an OS.
It is true that current policies should be random to change threads to migrate to other core or idle core.
Are there some good policies to schedule threads when OS happens load balance ?
OS has little info to do well-founded scheduling decisions. At most it can assume that threads of a process are dependent. Techniques to extract more precise info are inaccurate and/or costly, so AFAIK it's not worth it.
If a user wants really smart scheduling, he must take scheduling into his own hands, i.e. do it manually in user space.
At least it's current state of the art.