Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

choosing the processor for a program!

Posted on 2000-03-02
3
Medium Priority
?
208 Views
Last Modified: 2010-04-02
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
Comment
Question by:rrrrr80
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 3

Expert Comment

by:Iexpert
ID: 2576875
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
 
LVL 32

Accepted Solution

by:
jhance earned 120 total points
ID: 2576906
See the:

SetProcessAffinityMask()

in the SDK if you want to specify.  Otherwise NT will decide for you based on load.
0
 

Author Comment

by:rrrrr80
ID: 2589132
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question