KSE, libpthread & libthr: almost newbie question
Greg Lewis
glewis at eyesbeyond.com
Mon Oct 30 19:29:12 UTC 2006
On Mon, Oct 30, 2006 at 11:44:35AM -0500, Daniel Eischen wrote:
> On Mon, 30 Oct 2006, Greg Lewis wrote:
> >On Sun, Oct 29, 2006 at 09:24:14PM -0800, Julian Elischer wrote:
> >>Greg Lewis wrote:
> >>>If you really want to know, just send the running process a SIGQUIT and
> >>>it will dump the currently running threads to stdout. But yes, 1.4 and
> >>>1.5
> >>>both use "native" threads which correspond 1:1 with OS threads (plus
> >>>there are threads the JVM creates itself, as you note). The JVM threads
> >>>include garbage collection and AWT event handlers at least.
> >>>
> >>
> >>I gather it doesn't use libpthread, but rather just the syscalls?
> >
> >No, it does use libpthread (or libthr, or libc_r if you so choose). What
> >I'm saying is that the JVM maps a single Java thread to a single <pthread
> >library of your choice> thread. How that maps to a kernel thread is
> >then defined by the threading library.
> >
> >The point is that the JVM doesn't do any internal M:N business itself,
> >which was the original point under discussion IIRC.
>
> Does the JVM specify system or process scope threads when it does
> its mapping? Or does it not use pthread_attr_setscope() at all?
> (I know this doesn't apply to libthr or libc_r, only libpthread.)
It doesn't call pthread_attr_setscope() by default. The code suggests
that it is called to set threads to system scope when profiling is turned
on.
--
Greg Lewis Email : glewis at eyesbeyond.com
Eyes Beyond Web : http://www.eyesbeyond.com
Information Technology FreeBSD : glewis at FreeBSD.org
More information about the freebsd-current
mailing list