Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jul 2001 00:42:06 +0930
From:      Greg Lewis <glewis@eyesbeyond.com>
To:        Ian Jenkinson <ian.jenkinson@blueyonder.co.uk>
Cc:        freebsd-java@FreeBSD.ORG
Subject:   Re: Threads in Java on a variety of platforms
Message-ID:  <20010710004206.A80869@misty.eyesbeyond.com>
In-Reply-To: <000201c1086c$433a29e0$0a64a8c0@buxtongw>; from ian.jenkinson@blueyonder.co.uk 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 
moment.

> 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.

HTH.

-- 
Greg Lewis                            Email : glewis@eyesbeyond.com
Eyes Beyond                           Mobile: 0419 868 494
Information Technology                Web   : http://www.eyesbeyond.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20010710004206.A80869>