加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

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

发布时间:2020-12-13 20:20:09 所属栏目:Windows 来源:网络整理
导读:我正在使用start / AFFINITY [n] [.exe]命令启动具有指定关联性的可执行文件.我有一个有8个处理器(1,2,3,4,5,6,7,8)的系统.我想设置这个过程来使用所有的奇数处理器(1,7).我不知道如何做到这一点,想知道是否可以使用start命令.如果没有,是否有替代的命令行方
我正在使用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)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读