No subject


Sat Nov 12 19:29:10 PST 2005


------_=_NextPart_001_01C0589A.2C0CFB30
Content-Type: text/html;
	charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2652.35">
<TITLE>RE: diff between green and native threads</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>&gt; Hi</FONT>
<BR><FONT SIZE=2>&gt; Could anybody tell me the difference between Green Threads and Native</FONT>
<BR><FONT SIZE=2>&gt; Threads in Java ??</FONT>
</P>

<P><FONT SIZE=2>Green Threads vs Native Threads</FONT>
</P>

<P><FONT SIZE=2>&quot;You may hear the terms &quot;green threads&quot; and &quot;native threads&quot;. This</FONT>
<BR><FONT SIZE=2>refers to the Unix implementations of Java. When Java 1.0 first</FONT>
<BR><FONT SIZE=2>came out on Solaris, it did not use the native Solaris library</FONT>
<BR><FONT SIZE=2>libthread.so to support threads. Instead it used runtime thread</FONT>
<BR><FONT SIZE=2>support that had been written in Java for an earlier project</FONT>
<BR><FONT SIZE=2>code-named &quot;Green.&quot; That thread library came to be known as &quot;green</FONT>
<BR><FONT SIZE=2>threads.&quot;</FONT>
</P>

<P><FONT SIZE=2>&quot;Thread support on Windows used the native libraries from the start,</FONT>
<BR><FONT SIZE=2>but on Solaris green threads were used. That meant that threaded</FONT>
<BR><FONT SIZE=2>programs running on Solaris didn't get the benefit of the native</FONT>
<BR><FONT SIZE=2>libraries. In particular, if your Java program was executing on a</FONT>
<BR><FONT SIZE=2>multi processor Solaris system, it was never the case that different</FONT>
<BR><FONT SIZE=2>threads could execute truly in parallel by being dispatched on</FONT>
<BR><FONT SIZE=2>different processors. There are other benefits too, to do with more</FONT>
<BR><FONT SIZE=2>efficient mapping of I/O system calls.&quot;</FONT>
</P>

<P><FONT SIZE=2>From Just Java 2 Fourth Edition by Peter van der Linden</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C0589A.2C0CFB30--

---
To unsubscribe, mail advanced-java-unsubscribe at xcf.berkeley.edu
To get help, mail advanced-java-help at xcf.berkeley.edu



More information about the Advanced-java mailing list