Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 210
  • Last Modified:

choosing the processor for a program!

I have a NT server with 4 processors. I need to know how to start up programs from my TrafficCop on each separate processor so the four programs run parallel to each other. I have noticed that we are not using the full potential, let alone all of the processors. Is it up to my program to decide which processors to run on or is it up to the OS? How is this performed?
0
rrrrr80
Asked:
rrrrr80
1 Solution
 
IexpertCommented:
Obviously the OS must deal with it.
If a program supports running seperate instances of itself then
doing this allows the OS to spread them out over multiple processors.
If only one intance of a program can be started, then the program
must be explicitly written to use multiple threads, and again the
OS can share these out amoung the processors.
In summary it depends on how the programs are written.
0
 
jhanceCommented:
See the:

SetProcessAffinityMask()

in the SDK if you want to specify.  Otherwise NT will decide for you based on load.
0
 
rrrrr80Author Commented:
That is exactly what I was looking for!
Sorry it took me this long to get back to you! thanks again for the info!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now