I have an Intel E5620 processor. I have used cat /proc/[pid]/stat to determine what processor the process was last run on (39th field). How can I ensure that a process is dedicated to a processor (I have 8 available) or better yet, how can I dedicate a process to a core (I have 4)?
| |||
|
feedback
|
|
Based on your comment on MikeyB's answer you're trying to solve this the wrong way IMHO -- Both A better solution is to set your process' Trying to outsmart the scheduler is, as MikeyB pointed out, generally a Bad Idea. Let it do what it's designed to do, and ask for CPU cycles the RIGHT way ( | |||||
feedback
|
|
Usually, this is not necessary. Stop trying to outsmart the scheduler. | |||||
feedback
|
|
If you have it installed you can use the taskset command e.g.
to run process 2345 on cpu 2 | |||
|
feedback
|
|
To bind a process PID 12345 to the first processor, try this:
| |||||||
|
feedback
|
CPU C is only available to process Ptype of assignment. – voretaq7♦ Oct 6 '11 at 17:51