Jump to content
Sign in to follow this  
nznet

Would like to set the process a script will run on

Recommended Posts

nznet

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

Share this post


Link to post
Share on other sites
nznet

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

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.