Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jul 2001 00:42:06 +0930
From:      Greg Lewis <>
To:        Ian Jenkinson <>
Cc:        freebsd-java@FreeBSD.ORG
Subject:   Re: Threads in Java on a variety of platforms
Message-ID:  <>
In-Reply-To: <000201c1086c$433a29e0$0a64a8c0@buxtongw>; from on Mon, Jul 09, 2001 at 12:42:41PM +0100
References:  <000201c1086c$433a29e0$0a64a8c0@buxtongw>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Mon, Jul 09, 2001 at 12:42:41PM +0100, Ian Jenkinson wrote:
> 	I've a question about thread models employed within a Java JVM.
> 	Can anyone kindly offer a concise discussion on the comparison of the
> thread model employed on
> Microsoft Windows, Linux, FreeBSD and Solaris? If it's the same model on all
> of them, is the model the same
> with 'green' and 'native' on the Unix platforms? 

Hmmm, not sure how concise this will be, but I'll try to give you some 
idea :).  Green threads are essentially the same across all platforms.
They are implemented within and managed by the JVM itself.  Native
threads, however, rely on the underlying thread mechanism that is "native"
to the OS.  So Linux, for example, uses its clone() based kernel
threads which have a pthreads interface.  Solaris uses its native thread
library.  Etc.  The FreeBSD JDK port doesn't support native threads at the 

> Are these two logically the
> same at the level of java source that I write,
> just different deep within the JVM/how the OS implements it?

Well, yes and no.  With green threads you should get the same sort of
behaviour across the board.  With native threads (which is the default
on most OSes) behaviour can be somewhat different.  For example, when I
was learning Java I wrote a program which worked fine under Windows 95
but thrashed the CPU on Windows NT.  Why?  Different underlying thread
priority models.

> 	If this is covered on a URL I'll be happy to read it but the research I've
> done so far hasn't lead me to an answer.

I would have thought the main Java site has something on this somewhere,
but no idea where.


Greg Lewis                            Email :
Eyes Beyond                           Mobile: 0419 868 494
Information Technology                Web   :

To Unsubscribe: send mail to
with "unsubscribe freebsd-java" in the body of the message

Want to link to this message? Use this URL: <>