我正在使用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)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。