On Mon, 5 Jun 2000 18:47:54 -0700, Ashis Rout wrote:

>Michael,
>
>I am having a problem with jvm.
>
>if i run my app. with jvm( native Threads ) then each time i spawn a thread
>a new jvm starts.
>but with green threads this does not happen. why?

Are you sure that a new JVM starts?  Under Linux, native threads look like
processes in PS but are not really multiple processes but a thread for
the same process.  One way to "guess" that they are the same is that all
of the memory numbers match exactly between the different threads.  (CPU
time will not match as they are running different threads)

>if I run jvm with green threads, some of the system shared objects like
>"libpthread.so"  etc( all that are available in /usr/lib directory ) does
>not get loaded dynamically. but this does not happen with native threads.
>why??

libpthread.so is a library that helps implement Linux threads.  The green
threads implementation does not use Linux native threads so it would not
use that library.

>what is the shared object  "libphi.so" is for. I think different for above
>mention jvms. because when i swap the one in the native_thread directory
>with the green_thread, the shared objects gets loaded and new jvms gets
>created for each thread.
>
>let me know your opinion and some tips to overcome this problem.

Do not swap libraries from green and native threads directories.  These
are very specifically different for each behavior.

Green Threads are java threads that are 100% implemented within the JVM
and use no Linux threading libraries.  In fact, they work as if there are
no threads in the operating system.

Native Threads are java threads that are implemented with the help of
the base operating system threading engine.  Under Linux this is implemented
with the "clone()" system function and causes a process table entry for
each thread within the process.  This is, my guess, what you are seeing
as "a new JVM starts" but is not really a new JVM but just a native Linux
thread.

-- 
Michael Sinz ---- Technology and Engineering Director/Consultant
"Starting Startups"                 mailto:[EMAIL PROTECTED]
My place on the web  ------->>  http://www.sinz.org/Michael.Sinz



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

Reply via email to