apologies for blank repost [threads under linux]

Yvan Peter Yvan.Peter@cnet.francetelecom.fr
Thu, 05 Mar 1998 08:39:46 +0100


--------------6EA0DA49F28B4E86454A6D62
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Rahul Sood wrote:

> Hi,
>
> I posted this a few days ago but there wasn't any response. Could a linux
> user run ps while they have omniNames and one of the echo examples
> running, and report back the output?

  Haven't seen this post before but I may give you an answer. The output of ps if
normal since threads arenot yet implemented in the linux kernel. The only support is
a clone() primitive which is used in
linuxthreads to SIMULATE threads by using one process by logical thread and using
shared memory (I
think) to share data between threads/processes.

  Of course it may cause problems if you run many objects. You will have to wait for
real kernel threads or
try to switch to another thread package which would simulate threads by implementing
a scheduler
in-process (see
http://sunsite.unc.edu/pub/Linux/docs/faqs/Threads-FAQ/html/ThreadLibs.html).

  However it may not be very simple and I don't know if omniORB would compile and
run correctly.
Any experience out there ?

  Hope it helps,

    Yvan

> -Thanks,
>
> R. Sood
> rsood@panix.com
>
>  >
> > I compiled omniOrb 2.4.0 on a Linux kernel 2.0.29 on i586. omniThread
> > uses Posix threads on Linux. I checked and confirmed that I have
> > /usr/include/pthread.h and /usr/lib/libpthread.a
> >
> > When running the examples I noticed that upto 5 processes are created for
> > every impl object. Shouldn't impl objects be created in their own threads
> > instead of their own processes? omniNames also creates 5 processes on my
> > machine. Here's the output from ps, which shows 5 processes for the
> > omniOrb example eg3_impl, and 5 for omniNames. eg3_impl causes a 6th
> > process to be created for omniNames. At this rate I will run out of
> > process id's if running a few dozen objects under the BOA!
> >
> >   PID  TT STAT   TIME COMMAND
> >   155  p2 S      0:00 -bash
> >   157  p1 S      0:00 -bash
> >   169  p3 S      0:00 -bash
> >   201  p2 S      0:27 netscape
> >   203  p2 S      0:00 (dns helper)
> >   398  p2 S      0:00 ./num_server
> >   588  p0 S      0:00 -bash
> >   595  p0 S      0:00 /home/rsood/proj/omniORB_2.4.0/bin/i586_linux_2.0/omniNam
> >   599  p0 S      0:00 /home/rsood/proj/omniORB_2.4.0/bin/i586_linux_2.0/omniNam
> >   600  p0 S      0:00 /home/rsood/proj/omniORB_2.4.0/bin/i586_linux_2.0/omniNam
> >   601  p0 S      0:00 /home/rsood/proj/omniORB_2.4.0/bin/i586_linux_2.0/omniNam
> >   602  p0 S      0:00 /home/rsood/proj/omniORB_2.4.0/bin/i586_linux_2.0/omniNam
> >   637  p2 S      0:00 ./eg3_impl
> >   639  p2 S      0:00 ./eg3_impl
> >   640  p2 S      0:00 ./eg3_impl
> >   641  p0 S      0:00 /home/rsood/proj/omniORB_2.4.0/bin/i586_linux_2.0/omniNam
> >   642  p2 S      0:00 ./eg3_impl
> >   643  p2 S      0:00 ./eg3_impl
> >   646  p0 R      0:00 ps
> >
> >
> >
> >



--
Yvan PETER   France Telecom/CNET
42, rue des Coutures - BP6243 F-14066 CAEN Cedex
phone (+33) 2.31.75.91.39 / fax (+33) 2.31.73.56.26
email: Yvan.Peter@cnet.francetelecom.fr



--------------6EA0DA49F28B4E86454A6D62
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<HTML>
Rahul Sood wrote:
<BLOCKQUOTE TYPE=CITE>Hi,

<P>I posted this a few days ago but there wasn't any response. Could a
linux
<BR>user run ps while they have omniNames and one of the echo examples
<BR>running, and report back the output?</BLOCKQUOTE>
&nbsp; Haven't seen this post before but I may give you an answer. The
output of ps if normal since threads arenot yet implemented in the linux
kernel. The only support is a clone() primitive which is used in
<BR>linuxthreads to SIMULATE threads by using one process by logical thread
and using shared memory (I
<BR>think) to share data between threads/processes.

<P>&nbsp; Of course it may cause problems if you run many objects. You
will have to wait for real kernel threads or
<BR>try to switch to another thread package which would simulate threads
by implementing a scheduler
<BR>in-process (see <A HREF="http://sunsite.unc.edu/pub/Linux/docs/faqs/Threads-FAQ/html/ThreadLibs.html">http://sunsite.unc.edu/pub/Linux/docs/faqs/Threads-FAQ/html/ThreadLibs.html</A>).

<P>&nbsp; However it may not be very simple and I don't know if omniORB
would compile and run correctly.
<BR>Any experience out there ?

<P>&nbsp; Hope it helps,
<BR>&nbsp;
<BR>&nbsp;&nbsp;&nbsp; Yvan
<BLOCKQUOTE TYPE=CITE>

<P>-Thanks,

<P>R. Sood
<BR>rsood@panix.com

<P>&nbsp;>
<BR>> I compiled omniOrb 2.4.0 on a Linux kernel 2.0.29 on i586. omniThread
<BR>> uses Posix threads on Linux. I checked and confirmed that I have
<BR>> /usr/include/pthread.h and /usr/lib/libpthread.a
<BR>>
<BR>> When running the examples I noticed that upto 5 processes are created
for
<BR>> every impl object. Shouldn't impl objects be created in their own
threads
<BR>> instead of their own processes? omniNames also creates 5 processes
on my
<BR>> machine. Here's the output from ps, which shows 5 processes for the
<BR>> omniOrb example eg3_impl, and 5 for omniNames. eg3_impl causes a
6th
<BR>> process to be created for omniNames. At this rate I will run out
of
<BR>> process id's if running a few dozen objects under the BOA!
<BR>>
<BR>>&nbsp;&nbsp; PID&nbsp; TT STAT&nbsp;&nbsp; TIME COMMAND
<BR>>&nbsp;&nbsp; 155&nbsp; p2 S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:00 -bash
<BR>>&nbsp;&nbsp; 157&nbsp; p1 S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:00 -bash
<BR>>&nbsp;&nbsp; 169&nbsp; p3 S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:00 -bash
<BR>>&nbsp;&nbsp; 201&nbsp; p2 S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:27 netscape
<BR>>&nbsp;&nbsp; 203&nbsp; p2 S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:00 (dns
helper)
<BR>>&nbsp;&nbsp; 398&nbsp; p2 S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:00 ./num_server
<BR>>&nbsp;&nbsp; 588&nbsp; p0 S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:00 -bash
<BR>>&nbsp;&nbsp; 595&nbsp; p0 S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:00 /home/rsood/proj/omniORB_2.4.0/bin/i586_linux_2.0/omniNam
<BR>>&nbsp;&nbsp; 599&nbsp; p0 S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:00 /home/rsood/proj/omniORB_2.4.0/bin/i586_linux_2.0/omniNam
<BR>>&nbsp;&nbsp; 600&nbsp; p0 S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:00 /home/rsood/proj/omniORB_2.4.0/bin/i586_linux_2.0/omniNam
<BR>>&nbsp;&nbsp; 601&nbsp; p0 S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:00 /home/rsood/proj/omniORB_2.4.0/bin/i586_linux_2.0/omniNam
<BR>>&nbsp;&nbsp; 602&nbsp; p0 S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:00 /home/rsood/proj/omniORB_2.4.0/bin/i586_linux_2.0/omniNam
<BR>>&nbsp;&nbsp; 637&nbsp; p2 S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:00 ./eg3_impl
<BR>>&nbsp;&nbsp; 639&nbsp; p2 S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:00 ./eg3_impl
<BR>>&nbsp;&nbsp; 640&nbsp; p2 S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:00 ./eg3_impl
<BR>>&nbsp;&nbsp; 641&nbsp; p0 S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:00 /home/rsood/proj/omniORB_2.4.0/bin/i586_linux_2.0/omniNam
<BR>>&nbsp;&nbsp; 642&nbsp; p2 S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:00 ./eg3_impl
<BR>>&nbsp;&nbsp; 643&nbsp; p2 S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:00 ./eg3_impl
<BR>>&nbsp;&nbsp; 646&nbsp; p0 R&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:00 ps
<BR>>
<BR>>
<BR>>
<BR>></BLOCKQUOTE>
&nbsp;
<PRE>--&nbsp;
Yvan PETER&nbsp;&nbsp; France Telecom/CNET
42, rue des Coutures - BP6243 F-14066 CAEN Cedex
phone (+33) 2.31.75.91.39 / fax (+33) 2.31.73.56.26
email: Yvan.Peter@cnet.francetelecom.fr</PRE>
&nbsp;</HTML>

--------------6EA0DA49F28B4E86454A6D62--