Jump to content

Recommended Posts

Posted

Hi Guys,

I am trying to build a script that will spawn itself. The purpose is that I want to fully utilize a multi-core processor like the Intel I7 (which appears as 8 cores).

I have written a script that does some mathematical modelling and it takes a long time to complete the task. If I wrote a parent script to load say 8 child scripts passing command line parameters to the script for processor number and other stuff then if I could set the Processor Afinity I could allocate each script to a separate processor. I know I can do this manually but would like to incorporate in a parent and child script combination.

A command similar to the ProcessSetPriority being say ProcessSetAffinity would be extremely helpful. The Set Affinity option will come up on dual core and multicore processors.

I have searched this forum with no luck other than finding ProcessSetPriority. So if someone is able to help me it woul dbe greatly appreciated ;-)

Kidn Regards,

Stephen

Posted

Always try the helpfile before creating a new thread. A search for affinity would have given you _WinAPI_SetProcessAffinityMask().

Hi,

I tried the help file... always do... nothing came up.

Anyhow soon after posting I see there is already a topic about it in the forum and have found my answer.

Anyhow... thanks

Stephen

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...