How can one find out that a process (or one of its threads) is running on a specific processor in a multiprocessor machine.
Posted on 2004-08-18
Lets assume, I am working on a multiprocessor machine, which I am.
Process.GetCurrentProcess().Affinity = 2; //Or something similar to this.
Now, All I need to know how would I be able to identify programatically that this process would be running on the 2nd CPU.
Given that, I can use a ManagementObject with Win32_Processor.DeviceID, how would one prove (programatically) that a particular process or one of its threads is defintely running on an assigned processor. Are there any alternatives other than ManagementObject class?