Prashant Chandra wrote:
> 
> You are right.  It doesn't happen with green threads.
> But the code in invoke.c does not explicitly create any
> native threads.
> 
> I should read up on the pthreads implementation on Linux.
> Are these pthreads processes in anyway different from normal
> processes (i.e context switch is inexpensive)?  Or does
> the 'ps' command on Linux, lists threads not processes?

The pthreads implementation uses Linux threads through the __clone()
call. They're real threads - sharing process-private memory and having a
low-cost context switch. They just happen to take up process table
entries, which is why they show up in ps.

Nathan


> 
>   Thanks.
>      -prashant
> 
> Chris Abbey wrote:
> >
> > those are the native threads you wanted. this is the
> > way pthreads work on linux.
> >
> > At 21:36 11/10/99 -0500, Prashant Chandra wrote:
> > >I had posted this a few days ago, but somehow it
> > >didn't
> > >appear on the mailing list.  I am trying again.
> > >
> > >I tried compiling and running the invoke.c example
> > >in the Invocation API tutorial, with JDK 1.1.7v3 and
> > >native threads.  Everything went fine.
> > >
> > >I found that after the call to CreateJavaVM, three
> > >child
> > >processes are spawned by the calling process.  My
> > >question
> > >is what are these processes and what do they do?  I
> > >thought the invocation API allowed the Java VM to be
> > >embedded within a single process.
> > >
> > >Is there any documentation on how the Invocation API
> > >is
> > >actually implemented in the Linux JDK?
> > >
> > >I would appreciate if you could cc your reply to
> > >[EMAIL PROTECTED]
> > >
> > >Thanks in advance.
> > >   -prashant
> > >
> > >
> > >----------------------------------------------------------------------
> > >To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> > >with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> > >
> > >
> >
> >   cabbey at home dot net <*> http://members.home.net/cabbey
> >            I want a binary interface to the brain!
> > Today's opto-mechanical digital interfaces are just too slow!
> 
> --
> 
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to