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

前端之家收集整理的这篇文章主要介绍了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)
原文链接:https://www.f2er.com/windows/371413.html

猜你在找的Windows相关文章