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에서 Deploy to .NET Applications Using MATLAB Data API for .NET에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!