taskset and affinity masks
Hi, I am a bit puzzled by how taskset is behaving.
I have just for precessors #0 to #3, or cpus 1 to 4.
I expect the affinity mask 0x00000001 to mean 0001 =cpu1
I expect the affinity mask 0x00000002 to mean 0001 =cpu2
I expect the affinity mask 0x00000003 to mean 0011 =cpu 1+2
I expect the affinity mask 0x00000004 to mean 0100 =cpu 3
I expect the affinity mask 0x0000000f to mean 1111 =cpu 1+2+3+4
But if I do
taskset -c 0x00000004 Flight
my Flight program doggedly appears on cpu 1 on the system monitor.
IK, I only put the mask in because I get an error message (no such cpu) if I put taskset -c 4 Flight
To get it on cpu3 I get the pid of flight and do taskset -p 0x00000004 pid.
What have I been mis-reading over and over?
Last edited by tethysgods; 01-16-2010 at 01:16 PM.