I am on dual core C2D processor, Windows 7 (although this behavior is the same in all MS OSes I've seen). When I run any single threaded CPU-intensive task, it does not stick to 1 core, but rather randomly occupy some 50% of first core, and some 50% on second.

Why they do that? Doesn't that lead to lowering efficiency of L1 cache?

I know that I can set process affinity, I am just wondering the reasouns of such behavior.


Its not random. They are choosing the best place to drop it, no point in dropping it on a processor that is currently processing a heavy weight process...

It doesn't really affect L1 cache efficiency as its HIGHLY likely that the other processes will already have flushed the L1-Cache of all useful data. This is why there is so much talk of shared L2 and L3 caches ...

  • 1
    It probably helps to balance the thermal load as well. – Richard Aug 13 '10 at 8:07
  • That would be silly, when I set affinity to 1 core, I don't have any thermal issues. – BarsMonster Aug 13 '10 at 8:16
  • Goz, the thing is that there are NO other heavy weight processes. There is just 1, and nothing else is running. Why can't OS stick the process to 1 core and leave all tiny background tasks like UI and interrupts on the second one? – BarsMonster Aug 13 '10 at 8:18
  • 2
    @ Barsmonster: Perhaps I should re-phrase that as a process doing some heavyweight work (And really you'd be surprised how much heavyweight work will be done by the kernel). That work may only take microseconds to complete but it is still enough to shunt your process. – Goz Aug 13 '10 at 8:26
  • @Barsmonster re thermal issues: Just because you aren't having any thermal issues when setting affinity doesn't mean that you aren't increasing thermal stress. 0.1 degrees C higher is still more thermal stress than no degrees higher – Goz Aug 13 '10 at 8:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.