Windows 7 – 在Windows 7上设置与启动/ AFFINITY命令的关联

我正在使用start / AFFINITY [n] [.exe]命令启动具有指定关联性的可执行文件.我有一个有8个处理器(1,2,3,4,5,6,7,8)的系统.我想设置这个过程来使用所有的奇数处理器(1,7).我不知道如何做到这一点,想知道是否可以使用start命令.如果没有,是否有替代的命令行方式呢?

启动命令的帮助不是特别有用:

AFFINITY    Specifies the processor affinity mask as a hexadecimal number.
             The process is restricted to running on these processors.

             The affinity mask is interpreted differently when /AFFINITY and
             /NODE are combined.  Specify the affinity mask as if the NUMA
             node's processor mask is right shifted to begin at bit zero.
             The process is restricted to running on those processors in
             common between the specified affinity mask and the NUMA node.
             If no processors are in common,the process is restricted to
             running on the specified NUMA node.
AFFINITY与 hexidecimal mask配合使用,可以对所有处理器进行精细控制.请注意,最右边的位指定最低阶cpu(0)(见 KB 299641).

对于所讨论的情况,0xAA(10101010)请求您的进程使用处理器1,5和7,但不是0,4或6运行.请确保在命令行中不存在“0x”.

start /affinity AA app.exe

其他例子:

start /affinity 1 app.exe     (only use cpu 0)
 start /affinity 2 app.exe     (only use cpu 1)
 start /affinity 1F app.exe    (only use cpus 0,1,and 4)

相关文章

Windows2012R2备用域控搭建 前置操作 域控主域控的主dns:自...
主域控角色迁移和夺取(转载) 转载自:http://yupeizhi.blo...
Windows2012R2 NTP时间同步 Windows2012R2里没有了internet时...
Windows注册表操作基础代码 Windows下对注册表进行操作使用的...
黑客常用WinAPI函数整理之前的博客写了很多关于Windows编程的...
一个简单的Windows Socket可复用框架说起网络编程,无非是建...