OnCallReadyStart learning

taskset: set or retrieve a process's CPU affinity

taskset [options] mask command [argument...]
taskset [options] -p [mask] pid

What it does

taskset shows or sets the CPUs a process may run on, as a hexadecimal mask (1 = CPU 0, 3 = CPUs 0 and 1) or with -c a list (0,2-3).

Options you will use

-p, --pid
operate on an existing PID instead of starting a command.
-c, --cpu-list
a CPU list instead of a mask.
-a, --all-tasks
every thread of the PID.

Examples

$ taskset -cp 1210

which CPUs a process may use

$ sudo taskset -cp 0,1 1210

let it use both CPUs again

Gotchas

Try taskset in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.