Re: Binding a process to a specific processor.

From: Andreas Stahel (sha_at_hta-bi.bfh.ch)
Date: 10/30/03


Date: 30 Oct 2003 08:41:12 +0100

brian@doubledimension.com (Brian D. McGrew) writes:

Hello

you wrote

> The issue that we're having is that when we start our main program, it
> starts all of the sub processes and they get assigned to a processor
> at random (dual processors). I need to know, if there is a way to
> assign a specific program to a specific process. We're using C++,
> gcc-3.2.
There is an article in Linux Journal (July 2003) by Robert Love on
"CPU Affinity" on exactely this topic.

But I dare asking: are you sure that this is the right approach?
There are good reasons to lock a process to one CPU, but I do not see
one of those reasons in yuor problem.

Enjoy this day

Andreas
===========================================================================
Andreas Stahel E-Mail: Andreas.Stahel@[ANTI-SPAM]hti.bfh.ch
Mathematics, HTI Phone: ++41 +32 32 16 258
Quellgasse 21 Fax: ++41 +32 321 500
CH-2501 Biel WWW: www.hta-bi.bfh.ch/~sha
Switzerland