Is FreeBSD the right platfrom for JBOSS ?

Tom Samplonius tom at sdf.com
Tue Apr 1 10:37:33 PST 2003


On Tue, 1 Apr 2003, Thorsten Mauch wrote:

> Hi all
> I suffer a lot from the absence of native java threads in Linux. My
...

  I think it is important to define what "native" is.  Sun defines
"native" threads as implemented by the OS, rather than in the "green
threads" library.  In this definition, all the Linux jdk's use native
threads.  You can run "java -version" to see what you are using.

  However, Linux threads are implemented as pseudo-processes.  This limits
scalability somewhat, as threads are supposed to be very light-weight.
Context switches take longer, and each thread requires considerable base
memory.

  FreeBSD threads are implemented in-process with the pthread library.
These processes are quite lightweight.  The jdk1.3.1 and jdk1.4.1 ports
now use native FreeBSD threads, rather than green threads.  But pthread
threads only use a single processor.

  There is a perception that native OS threads are always faster than
green threads or some other internally implemented thread system.  That
isn't always the case. For intstance, Weblogic built their own JVM
(JRockit) and they purposesly implemented their own thread system that
does not use OS threads at all.  They claim that their JVM is faster for
hosting server apps than any other JVM.

Tom



More information about the freebsd-java mailing list