Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How does a program "choose" which core to run on? It was my understanding that the operating system determines which program gets processed on which core.

APPLICABLE EXAMPLE

Firefox has suddenly and rampantly been running up CPU usage on the furthest last core (i7 930 Hyperthreaded). All of the other cores are nearly usage-free.

I'm not sure why this last core is being unnecessarily picked on. I'm curious as to how it'd get singled out. Usually the first two cores handle the brunt of programs' processing.

share|improve this question
    
Processes generally don't pick cores. The OS – specifically, the scheduler – decides when and where each process should run. –  grawity Apr 15 '13 at 8:50

1 Answer 1

up vote 3 down vote accepted

You would be correct. The app will run on whichever core the operating system happens to choose. You can set the "affinity" for an application to a specific core, telling the OS to only run the app on that core. It's not a good idea from my understanding, but obviously it exists for a reason; so there are times it may be necessary to adjust.

In Windows you can use Task Manager:

Right click on the process, and choose "**Set Affinity**". 

As far as the technical aspects of it:

Wikipedia article on scheduling

share|improve this answer
    
Anecdotal notes: Adjusting affinity has done nothing but improve performance for me. Windows' scheduler does a terrible job, doing exactly what OP sees: Dumping nearly everything on one core (usually 0, in my experience, but YMMV), and thinking all is well as it struggles under the load. Additionally, managing affinities is a great way to manage heat if you have multiple apps at the same time. There are a few utilities to permanently set affinity, I've found Bitsum's Process Lasso to be lightweight and very helpful on multiple machines. bitsum.com/processlasso –  Smithers Jan 20 at 17:24

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.