I wish to pin a process to a CPU1 in my dual CPU machine - how can I do it in Linux - any pointers ?
Tell me more
×
Super User is a question and answer site for
computer enthusiasts and power users. It's 100% free, no registration required.
|
migrated from stackoverflow.com Mar 25 '11 at 8:16
|
You should think long and hard about why you think you're smarter than the scheduler. After that, if you still want to set the cpu affinity of a process on linux you can use the taskset command or, if you're writing the program yourself, the sched_setaffinity system call. |
|||
|
|
|
Fwiw: we did this, pinning every process in an averagely complex application that we well mastered. We found out that the linux kernel scheduler is better than us at allowing processors and processing time, as others stated above ... |
|||
|
|