简体   繁体   English

Windows亲和力

[英]Windows Affinity

When setting the Windows CPU affinity mask for Core 2, is the mask supposed to be 0x0010 or 0x0001? 为Core 2设置Windows CPU亲和力掩码时,掩码应该是0x0010还是0x0001? I have seen an example where the mask was set to 0x0010 for Core 0 but this didn't make much sense? 我看过一个示例,其中将Core 0的掩码设置为0x0010,但这没有多大意义?

0x0000 allows no CPUs to be scheduled for this process/thread at all. 0x0000根本不允许为该进程/线程调度任何CPU。 (it will be suspended, assuming setting the affinity doesn't fail during parameter validation, which might be different on different Windows versions) (它将暂停,前提是在参数验证期间设置亲和力不会失败,这在不同的Windows版本上可能会有所不同)

0x0001 allows Core 0, only 0x0001仅允许核心0

0x0002 allows Core 1, only 0x0002仅允许核心1

0x0003 allows both Core 0 and Core 1. 0x0003允许核心0和核心1。

您也可以任务集

("taskset -cp 2 %d"% os.getpid())

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM