Você pode usar taskset em util-linux
.
The masks may be specified in hexadecimal (with or without a leading "0x"), or as a CPU list with the --cpu-list option. For example,
0x00000001 is processor #0, 0x00000003 is processors #0 and #1, 0xFFFFFFFF is processors #0 through #31, 32 is processors #1, #4, and #5, --cpu-list 0-2,6 is processors #0, #1, #2, and #6. When taskset returns, it is guaranteed that the given program has been scheduled to a legal CPU.