[omniORB] Multiple Instances in Linux

Shane Turner tsturner@bellsouth.net
Sat, 16 Oct 1999 16:45:43 -0500


So, does this mean that there is actually a process for each thread?
Or is it just how it's being represented by "ps".  It seems to me that
if there is a process for each thread, then it defeats the purpose of having
threads.  (A lightweight process which isn't as expensive as running a whole new process)

Shane

-----Original Message-----
From:	Christof Meerwald [SMTP:cmeerw@htl.fh-sbg.ac.at]
Sent:	Saturday, October 16, 1999 1:05 PM
To:	omniorb-list@uk.research.att.com
Subject:	Re: [omniORB] Multiple Instances in Linux

On Sat, 16 Oct 1999 12:39:12 -0500, Shane Turner wrote:
>I have recently downloaded omniOrb 2.8 and compiled it successfully under Redhat 6.0.
>When I start up omniNames or any other server, I issue the "ps" command to make sure
>the server is running.  However, when I do "ps", I seem to have five instances of
>  omniNames running.
>This also happens when I run the examples such as eg3_impl.
>Why is this????
This is a LinuxThreads FAQ (somewhere on
http://pauillac.inria.fr/~xleroy/linuxthreads):

  D.5: When I'm running a program that creates N threads, top or ps display
  N+2 processes that are running my program. What do all these processes
  correspond to?

  Due to the general "one process per thread" model, there's one process for
  the initial thread and N processes for the threads it created using
  pthread_create. That leaves one process unaccounted for. That extra
  process corresponds to the "thread manager" thread, a thread created
  internally by LinuxThreads to handle thread creation and thread
  termination. This extra thread is asleep most of the time.



bye, Christof

-- 
Don't hate yourself in the morning... sleep until noon!