Subject: Re: which cpu is a process bound to on an MP system?

From: [email-masked] (Bil Lewis)
Date: 6 May 1994 23:49:14 GMT

Yes, but no.  The top-level answer is: "You don't want to know & we aren't
going to tell you."

  Seriously, this is one of those "Trust the OS, it knows what it's doing"
kinda things.  There is a clever formula we use to give a process a
preference towards the last CPU it was on (maybe some of the Cache is still
mapped!), but there are no guarantees.  A given LWP (as that's what's really
being scheduled) can run on CPU 1 today, CPU 19 tomorrow, and CPU 2, 4, & 6
inbetween.

  In addition: Bound theads are bad things.  Don't use them.  If you know
enough to know that you REALLY do want to use them, then you know more than
I do & you should be posting answers, not questions.  :-)

-Bil

Andy Bensky ([email-masked]) wrote:
: Is there any way to tell which cpu a particular process is bound to when
: running on an MP system?  It would be great if ps had an option for
: displaying this information.  

: My understanding is that on MP systems in Solaris every process is bound to
: a particular cpu.  If a process threads using libthread then each thread is
: bound until it releases control.  Is there any way to tell on which cpu is a
: process and/or it's threads running?  It seems like this would be an obvious
: thing to add to ps once you make a system into a multiprocessor, but I don't
: see this information anywhere.

: thanks,

: andy bensky
: infoseek corp.

--
  Three days late!  I told you butter wouldn't suit the works.