Ryu Connor wrote:Igor_Kavinski wrote:I want more control because the Windows thread scheduler seems to bounce around threads for no reason. If I make it multithreaded, then I am at the mercy of whatever crazy algorithms have been programmed into the scheduler.
I believe Windows round robins the thread across the cores as an element of power management/heat reduction.
The pre-Win7 thread scheduler looks for the lowest core to run a thread that is coming out of sleep. This means when you have one active thread, it will constantly round-robin the cores as the current core will always be the heavily loaded.
eg. An active thread is running on Core 0. This means Core 0 is at 100%. When that thread's time-slice is up, the OS almost immediately reschedules that thread because it's the only one active. When the scheduler looks at which core to run on, it sees Core 0 is at 100%, so it schedules the thread on Core 1. Rinse and repeat.
Win7 tries it's best to not move a thread unless it has to, and it will also shut-down other cores that are not in use. Win7 will not wake-up a slept core until the current cores reach some-threshold, which I think is 110% load. This sacrifices a small amount of throughput for a large potential in power-savings.