某些情况下要多次运行同一个程序,但是想指定不同的CPU来处理。
命令格式: start /AFFINITY参数 CPU核心对应16进制数 运行程序路径
二进制数字():
cpu3 cpu2 cpu1 cpu0
start /affinity ff notepad.exe
假如有2个CPU,每个8个,第二个cpu的全部8核,1111111100000000即ff00
start /affinity ff00 notepad.exe
命令格式: start /AFFINITY参数 CPU核心对应16进制数 运行程序路径
如:start /AFFINITY 0x1 notepad.exe
16位掩码值:
4核为例,用cpu3 cpu2 cpu1,不用cpu0二进制数字():
cpu3 cpu2 cpu1 cpu0
1 1 1 0 -> 1110 => 16进制就是 e
同理,
假如有2个CPU,每个8个,第一个cpu的全部8核,11111111即ffstart /affinity ff notepad.exe
假如有2个CPU,每个8个,第二个cpu的全部8核,1111111100000000即ff00
start /affinity ff00 notepad.exe