简体   繁体   中英

Windows Affinity

When setting the Windows CPU affinity mask for Core 2, is the mask supposed to be 0x0010 or 0x0001? I have seen an example where the mask was set to 0x0010 for Core 0 but this didn't make much sense?

0x0000 allows no CPUs to be scheduled for this process/thread at all. (it will be suspended, assuming setting the affinity doesn't fail during parameter validation, which might be different on different Windows versions)

0x0001 allows Core 0, only

0x0002 allows Core 1, only

0x0003 allows both Core 0 and Core 1.

您也可以任务集

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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