0

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.

BarsMonster
  • 644
  • 3
  • 11
  • 24

1 Answers1

0

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 ...

Goz
  • 156
  • 2
  • 8
  • 1
    It probably helps to balance the thermal load as well. – Richard Aug 13 '10 at 08:07
  • That would be silly, when I set affinity to 1 core, I don't have any thermal issues. – BarsMonster Aug 13 '10 at 08: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 08: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 08: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 08:27
  • @Goz: but consider Intel's "Turbo Boost" in Neelham architecture CPUs -- it is a benefit do focus on one core and allow others to idle. (PS. this is a different Richard :-)) – Richard Aug 13 '10 at 08:32
  • Yeah but such decision should REALLY be left up to an OS kernel level driver. What improves performance on one system may not improve performance on another. I'd suspect that intel has provided a driver for the turbo boost feature that does just that ... – Goz Aug 13 '10 at 08:46
  • My laptop on i5 does not do that. It tends to use both(4 with HT) cores even if combined load is under 10%. – BarsMonster Aug 13 '10 at 12:38