PDA

View Full Version : Windows code for core affinity?



K404
09-17-2006, 08:47 AM
Sorry...this isnt a guide..its a plead for help :)

I`m trying to find a way to switch between cores with a user-defined time delay between switches..

e.g...CPU0 CPU1 for time X then CPU0 for time X then CPU0 CPU1 for time x

if anyone can help, please let me know

Thanks

Kenny :D

Deadeye550
09-18-2006, 11:16 AM
which language?

I know this reply is short but right to the point :)

K404
09-18-2006, 01:19 PM
Whatever works, and will be liked by windows. Sorry, i`m really not a coder. I can just about follow C or C++, but if anyone is interested in messing around with this, I wont give a list of diva requests.

Thanks,

Kenny

I mentioned time X in the OP.. X isnt necessarily the same time for all cases.. times a b and c would have been more appropriate, sorry.

eshbach
09-19-2006, 04:36 AM
In .NET, you just set the ProcessorAffinity property on a System.Diagnostics.Process object.

Here's an MSDN page with examples in C++/C#/VB.NET/J#/JScript

http://msdn2.microsoft.com/en-us/library/system.diagnostics.process.processoraffinity.aspx