24
3
I'm just curious why the scheduler constantly moves an app between CPUs, rather than keeping it on one. It looks a bit silly to have 4 cores at 25% rather than one at 100%.
Does it has to do with heat, or is it more efficient somehow? Do other OS's do it differently?
Insights or links to in-depth stuff would be nice. (Couldn't find much myself.)
Update:
By "spread out" I don't mean that it executes on several cpu's at once, but is being moved from one to the other several times per second, making the effect that it looks spread out.
It's a goomba. SMB, not LBP. :) – Macke – 2017-04-18T08:22:55.070
In my "answer", I showed a single threaded program behaving exactly as you describe, i.e. "being moved from one to the other several times per second, making the effect that it looks spread out." – Evan Rosica – 2017-11-24T21:16:30.320
3Even when "nothing else is executing", there are always system threads competing for CPU. For example, the O/S has a thread to zero out reclaimed memory pages so when memory is required, it'll have some pages ready to go. When your thread goes to execute again, the cpu you were on may be in use by one of these threads. What should the os do? Wait for it or move you to a new cpu? What ever it does, you end up with undesirable behavior in some cases. – Tony Lee – 2009-08-20T13:22:11.813