How to choose a group when setting affinity to a process for multi-processor system
显示 更早的评论
I have a windows machine with 2 processors 64 cores each. Before with one processor I was able to use the code below. Now I have two processor groups and didn't find any info how to manipulate it.
For example, Process_1 - group 0 CPU 23-63 or Process_2 - group 1 CPU 1-63. Also, Is it possible to set both groups to one process?
Process_1 = System.Diagnostics.Process.GetProcessById(my_process_ID);
aff = Process_1.ProcessorAffinity.ToInt32; % get current affinity mask
fprintf('Current affinity mask: %s\n', dec2bin(aff, 36));
proc.ProcessorAffinity = System.IntPtr(int32(2)); % set affinity mask
fprintf('Adjusted affinity to: %s\n', dec2bin(proc.ProcessorAffinity.ToInt32, 36));
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 ARM Cortex-M Processors 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!