1999Q4/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev] Two threads forced to one CPU? (was: Collecting ideas for a MUD server...) -->
<!--X-From-R13: X Q Znjerapr <pynjNxnatn.ah> -->
<!--X-Date: Thu, 23 Dec 1999 09:31:58 &#45;0800 -->
<!--X-Message-Id: E121C5e&#45;0001kn&#45;00#dingo,kanga.nu -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: Pine.LNX.3.96.991223013639.1754G&#45;100000#maul,sith.vpn -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev] Two threads forced to one CPU? (was: Collecting </title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:claw#kanga,nu">
</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="msg00770.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00772.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00764.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00776.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00771">Author</A>
&nbsp;|&nbsp;<A HREF="#00771">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00771">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] Two threads forced to one CPU? (was: Collecting ideas for a MUD server...)</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>: Re: [MUD-Dev] Two threads forced to one CPU? (was: Collecting ideas for a MUD server...) </LI>
<LI><em>From</em>: J C Lawrence &lt;<A HREF="mailto:claw#kanga,nu">claw#kanga,nu</A>&gt;</LI>
<LI><em>Date</em>: Thu, 23 Dec 1999 09:31:50 -0800</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Sender</em>: <A HREF="mailto:mud-dev-admin#kanga,nu">mud-dev-admin#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>
On Thu, 23 Dec 1999 01:40:44 -0800 (PST) 
Wesley W Terpstra &lt;terpstra#iota,dhs.org&gt; wrote:

&gt; You're saying if I spawn two threads and having both work nonstop
&gt; the OS won't put them on different CPUs?

Not necessarily.  Further, very few OSes support runtime thread
migration (IRIX is one of the few FWIW).  

What does this mean?  

Scenario:

  If you have say a 2-way box with a single process hogging one CPU,
and the second CPU mostly free, new threads are most likely to be
assigned to the second CPU.  This is reasonable.  Now let's say that
the hoggy process dies, leaving the second CPU hogged with threads
and the first entirely idle.

  Under most current OSes nothing changes.  All the threads continue
execution on the CPU they were originally assigned and the first CPU
remains idle.  Future thread and process starts will likely be
assigned to the firt CPU, but if there are none it will remain idle.
Some OSes, and they are very few, will dynamically migrate threads
between CPUs (and even between nodes in a cluster in some cases (cf
IRIX CC:NUMA)) at runtime to best use available resources.  

&gt; I thought this was the whole point to multi-threading?  

There are a great many points to MT.  The base concept is getting
multiple process counters in a single shared code and data segment.
Once you get past there into the realms of justification you can be
talking about almost anything.

That all said, probably the most common reason used for MT is the
comment Rahul (?) made about blocking.

-- 
J C Lawrence                                 Home: claw#kanga,nu
----------(*)                              Other: coder#kanga,nu
--=| A man is as sane as he is dangerous to his environment |=--


_______________________________________________
MUD-Dev maillist  -  MUD-Dev#kanga,nu
<A  HREF="http://www.kanga.nu/lists/listinfo/mud-dev">http://www.kanga.nu/lists/listinfo/mud-dev</A>

</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="00781" HREF="msg00781.html">Re: [MUD-Dev] Two threads forced to one CPU? (was: Collecting ideas for a MUD server...)</A></strong>
<ul compact><li><em>From:</em> Greg Miller &lt;gmiller#classic-games,com&gt;</li></ul>
<li><strong><A NAME="00776" HREF="msg00776.html">Re: [MUD-Dev] Two threads forced to one CPU? (was: Collecting ideas for a MUD server...)</A></strong>
<ul compact><li><em>From:</em> "Jay Carlson" &lt;nop#mitre,org&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00764" HREF="msg00764.html">[MUD-Dev] Two threads forced to one CPU? (was: Collecting ideas for a MUD server...)</A></STRONG>
<UL><LI><EM>From:</EM> "Wesley W. Terpstra" &lt;terpstra#iota,dhs.org&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00770.html">[MUD-Dev] Re: MUD-Dev digest, Vol 1 #237 - 9 msgs</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00772.html">Re: [MUD-Dev] Collecting ideas for a MUD server... (fwd)</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00764.html">[MUD-Dev] Two threads forced to one CPU? (was: Collecting ideas for a MUD server...)</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00776.html">Re: [MUD-Dev] Two threads forced to one CPU? (was: Collecting ideas for a MUD server...)</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00771"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00771"><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>Re: [MUD-Dev] Collecting ideas for a MUD server... (fwd)</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00757" HREF="msg00757.html">Re: [MUD-Dev] Collecting ideas for a MUD server... (fwd)</A></strong>, 
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Thu 23 Dec 1999, 07:38 GMT
<UL>
<LI><strong><A NAME="00763" HREF="msg00763.html">Re: [MUD-Dev] Collecting ideas for a MUD server... (fwd)</A></strong>, 
Rahul Sinha <a href="mailto:rsinha#glue,umd.edu">rsinha#glue,umd.edu</a>, Thu 23 Dec 1999, 17:00 GMT
<UL>
<LI><strong><A NAME="00772" HREF="msg00772.html">Re: [MUD-Dev] Collecting ideas for a MUD server... (fwd)</A></strong>, 
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Thu 23 Dec 1999, 17:48 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00764" HREF="msg00764.html">[MUD-Dev] Two threads forced to one CPU? (was: Collecting ideas for a MUD server...)</A></strong>, 
Wesley W. Terpstra <a href="mailto:terpstra#iota,dhs.org">terpstra#iota,dhs.org</a>, Thu 23 Dec 1999, 17:00 GMT
<UL>
<LI><strong><A NAME="00771" HREF="msg00771.html">Re: [MUD-Dev] Two threads forced to one CPU? (was: Collecting ideas for a MUD server...)</A></strong>, 
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Thu 23 Dec 1999, 17:31 GMT
<UL>
<LI><strong><A NAME="00776" HREF="msg00776.html">Re: [MUD-Dev] Two threads forced to one CPU? (was: Collecting ideas for a MUD server...)</A></strong>, 
Jay Carlson <a href="mailto:nop#mitre,org">nop#mitre,org</a>, Thu 23 Dec 1999, 20:50 GMT
</LI>
<LI><strong><A NAME="00781" HREF="msg00781.html">Re: [MUD-Dev] Two threads forced to one CPU? (was: Collecting ideas for a MUD server...)</A></strong>, 
Greg Miller <a href="mailto:gmiller#classic-games,com">gmiller#classic-games,com</a>, Fri 24 Dec 1999, 07:47 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00773" HREF="msg00773.html">Re: [MUD-Dev] Two threads forced to one CPU? (was: Collecting ideas for a MUD server...)</A></strong>, 
Marc Bowden <a href="mailto:ryumo#merit,edu">ryumo#merit,edu</a>, Thu 23 Dec 1999, 18:00 GMT
</LI>
</UL>
</LI>
</ul>
</ul>
<LI><strong><A NAME="00749" HREF="msg00749.html">Re: [MUD-Dev] Collecting ideas for a MUD server... (fwd)</A></strong>, 
Rahul Sinha <a href="mailto:rsinha#glue,umd.edu">rsinha#glue,umd.edu</a>, Thu 23 Dec 1999, 05:36 GMT
</LI>
</ul>
</ul>
</ul>
</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>