How to set CPU affinity to a process

Solution 1:

You can do this with taskset :

taskset 0x03 your_command

will launch your_command on the cpus #0 and #1.