Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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

share|improve this answer
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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