1998Q3/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: [Java] multithreading: update and a question -->
<!--X-From-R13: Hnqvz Fxnpuraxb <igNserrubyq.pebpbqvyr.bet> -->
<!--X-Date: Tue, 14 Jul 1998 22:56:41 &#45;0700 -->
<!--X-Message-Id: 35AC445F.A2B04805#freehold,crocodile.org -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 199807150458.WAA02517@ami&#45;cg.GraySage.Edmonton.AB.CA -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Re: [Java] multithreading: update and a question</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:vt#freehold,crocodile.org">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
      text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">

  <font size="+4" color="#804040">
    <strong><em>MUD-Dev<br>mailing list archive</em></strong>
  </font>
      
<br>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00221.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00223.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00221.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00223.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00222">Author</A>
&nbsp;|&nbsp;<A HREF="#00222">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00222">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: [Java] multithreading: update and a question</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Subject</em>: [MUD-Dev] Re: [Java] multithreading: update and a question</LI>
<LI><em>From</em>: Vadim Tkachenko &lt;<A HREF="mailto:vt#freehold,crocodile.org">vt#freehold,crocodile.org</A>&gt;</LI>
<LI><em>Date</em>: Wed, 15 Jul 1998 00:55:43 -0500</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
Chris Gray wrote:

[skipped]

&gt; I'd guess that whether or not you want one OS thread per Java thread
&gt; would end up depending on how many Java threads you use, and how often
&gt; you create and destroy them.

[speaking about me]

I'm creating and destroying threads deliberately carelessly, on demand,
'cause remember that the preliminary optimization is a mother of all
evil. The Jukebox as it is today survived almost 2 years before I
started (because needed to) to optimize it.

&gt; If you end up with only about a dozen or less,

Nah, the estimate is a count of hundreds - based on the test results, I
consider a 1000 threads a reasonable default for a number of threads -
that was Linux &amp; Solaris on PII/350 with 128M RAM, which is I guess not
considered a server configuration novadays.

&gt; than going with native threads each is easy, and will work
&gt; fairly well. I think we've talked before about having a pool of
&gt; threads that can be used for whatever is needed, without having to go
&gt; to the considerable expense of creating and recycling them. If the
&gt; Java app really does need dozens of threads active at the same time,
&gt; its likely going to be a tad slow no matter how you do it.
&gt; 
&gt; If you take the Solaris solution, then in a sense you get the best
&gt; of both worlds. With few Java threads, you get an OS thread for each
&gt; one, and make good use of multiple CPUs. With many Java threads, you
&gt; are limiting the use of OS threads, but still getting your Java app
&gt; going. Sounds good to me.

See, there's a drawback - the architecture solutions for one/one,
many/one and many/many are different. Java becomes a curse
portability-wise, because it's SUPPOSED to behave in the same way, but
depending on the platform implementation different people working on
different platforms will lose their (voice fibers? what's the English
term? am I making myself clear here?) shouting and trying to convince
each other in what sucks and what rules.

The only portable solution I see so far is to have a java.lang.Thread
wrapper as a base of a thread entity, and make it just a thread for
many/many (also for many/one, because it doesn't matter in this case),
and something more sophisticated for one/one.

&gt; What's the name of the new lighter-weight threads in the new Windows
&gt; systems?

Fibers?

&gt; Perhaps they might be appropriate for Java threads, although
&gt; I vaguely recall that there is no pre-emptive switching among them.
&gt; 
&gt;  &gt;Please consider this as a technical question, not the OS war.
&gt; 
&gt; Awwww!

Have some more explosive stuff at hand, like: local user context...

-- 
Still alive and smile stays on,
Vadim Tkachenko &lt;vt#freehold,crocodile.org&gt;
--
UNIX _is_ user friendly, he's just very picky about who his friends are


</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<ul compact><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><A NAME="00223" HREF="msg00223.html">[MUD-Dev] Re: [Java] multithreading: update and a question</A></strong>
<ul compact><li><em>From:</em> Ben Greear &lt;greear#cyberhighway,net&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00221" HREF="msg00221.html">[MUD-Dev] Re: [Java] multithreading: update and a question</A></STRONG>
<UL><LI><EM>From:</EM> Chris Gray &lt;cg#ami-cg,GraySage.Edmonton.AB.CA&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00221.html">[MUD-Dev] Re: [Java] multithreading: update and a question</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00223.html">[MUD-Dev] Re: [Java] multithreading: update and a question</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00221.html">[MUD-Dev] Re: [Java] multithreading: update and a question</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00223.html">[MUD-Dev] Re: [Java] multithreading: update and a question</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00222"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00222"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><STRONG>[MUD-Dev] Re: [DESIGN] Antagonizing players</STRONG>, <EM>(continued)</EM>
<ul compact>
<LI><strong><A NAME="00228" HREF="msg00228.html">[MUD-Dev] Re: [DESIGN] Antagonizing players</A></strong>, 
quzah <a href="mailto:quzah#geocities,com">quzah#geocities,com</a>, Wed 15 Jul 1998, 16:28 GMT
<UL>
<LI><strong><A NAME="00230" HREF="msg00230.html">[MUD-Dev] Re: [DESIGN] Antagonizing players</A></strong>, 
Richard Woolcock <a href="mailto:KaVir#dial,pipex.com">KaVir#dial,pipex.com</a>, Wed 15 Jul 1998, 18:33 GMT
</LI>
</UL>
</LI>
</ul>
</LI>
<LI><strong><A NAME="00225" HREF="msg00225.html">[MUD-Dev] [CODE RELEASE]  ScryMUD, and the Hegemon Client 1.4.3  (minor release)</A></strong>, 
Ben Greear <a href="mailto:greear#cyberhighway,net">greear#cyberhighway,net</a>, Wed 15 Jul 1998, 07:01 GMT
<LI><strong><A NAME="00221" HREF="msg00221.html">[MUD-Dev] Re: [Java] multithreading: update and a question</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Wed 15 Jul 1998, 05:02 GMT
<UL>
<LI><strong><A NAME="00222" HREF="msg00222.html">[MUD-Dev] Re: [Java] multithreading: update and a question</A></strong>, 
Vadim Tkachenko <a href="mailto:vt#freehold,crocodile.org">vt#freehold,crocodile.org</a>, Wed 15 Jul 1998, 05:56 GMT
<UL>
<LI><strong><A NAME="00223" HREF="msg00223.html">[MUD-Dev] Re: [Java] multithreading: update and a question</A></strong>, 
Ben Greear <a href="mailto:greear#cyberhighway,net">greear#cyberhighway,net</a>, Wed 15 Jul 1998, 06:44 GMT
<UL>
<LI><strong><A NAME="00224" HREF="msg00224.html">[MUD-Dev] Re: [Java] multithreading: update and a question</A></strong>, 
Vadim Tkachenko <a href="mailto:vt#freehold,crocodile.org">vt#freehold,crocodile.org</a>, Wed 15 Jul 1998, 06:59 GMT
</LI>
<LI><strong><A NAME="00641" HREF="msg00641.html">[MUD-Dev] Re: [Java] multithreading: update and a question</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Tue 11 Aug 1998, 01:59 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00232" HREF="msg00232.html">[MUD-Dev] Re: [Java] multithreading: update and a question</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Wed 15 Jul 1998, 18:44 GMT
</LI>
</UL>
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>