msg00277.html

1999Q2/msg00277.html · 9.0 KB

From the archive 1999Q2.zip

Download the archive   « Back to the archive contents

<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev] Multi&#45;threaded mud server. -->
<!--X-From-R13: Dbff @vpbyy <eavpbyyNybfgvpf.qrzba.pb.hx> -->
<!--X-Date: Sun, 16 May 1999 21:22:08 &#45;0700 -->
<!--X-Message-Id: Pine.LNX.4.10.9905170516090.5535&#45;100000@drpc&#45;jrn.res.st&#45;and.ac.uk -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 4.1.19990516165255.00a48770#pop,darklock.com -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev] Multi-threaded mud server.</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:rnicoll#lostics,demon.co.uk">
</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="msg00276.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00278.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00273.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00280.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00277">Author</A>
&nbsp;|&nbsp;<A HREF="#00277">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00277">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] Multi-threaded 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] Multi-threaded mud server.</LI>
<LI><em>From</em>: Ross Nicoll &lt;<A HREF="mailto:rnicoll#lostics,demon.co.uk">rnicoll#lostics,demon.co.uk</A>&gt;</LI>
<LI><em>Date</em>: Mon, 17 May 1999 05:23:36 +0000 (GMT)</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 Sun, 16 May 1999, Caliban Tiresias Darklock wrote:

&gt; &gt;The MUD creates as many threads as processors, and then allocates players
&gt; &gt;and computer characters in such a way that load on each processor should
&gt; &gt;be roughly equal. This should keep context switching to a minimum.
&gt; Maybe I don't understand context switching -- my understanding of threads
&gt; is minimal -- but this sounds fallacious. As I understand it, context
&gt; switching is when one thread gives way to another thread, which means its
&gt; state (context) needs to be saved and the other's has to be restored
&gt; (switching). 

&gt; So if you have two players online, each with one character, each on a
&gt; different thread of a multiprocessor machine, and they have a conversation
[snip]
&gt; So your context switching immediately goes through the roof, doesn't it? 
Sorry, this is me not explaining what I meant very well, I think. As I
understood it, most MUDs allocated a new thread per user. However, your
later suggestions do seem definately better than mine...

&gt; If I'm correct in this understanding, and please correct me if I'm not,
&gt; then the "proper" way to implement such a scheme would be for each thread
&gt; to accomplish specific *tasks* instead of handling specific *objects*. So
&gt; instead of a series of "do things with an object" threads, you would have a
&gt; series of "do this thing" threads -- and those which are rarely if ever
&gt; called can be shut down entirely after a given period. For example, you
&gt; might have a "login" thread which handles everyone connected but not logged
&gt; in, a thread which handles combat, a thread which handles character
&gt; creation, etc. 
An interesting idea, but I think it would require too much inter-process
communication, and in particular may not load balance very well...

&gt; A related thought (and the one I'm still considering) would be a thread for
&gt; each area. When no one is in area X, that area can be safely unloaded from
&gt; memory; thus, with five players online, you don't need to have eighty areas
&gt; loaded. Just five, at most. All the other threads can be halted altogether. 
Now this I like, as it kinda goes right around most of the database write
problems... however, load balancing again becomes a problem, and player
would have to be moved between threads, which is a problem in itself...



_______________________________________________
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="00284" HREF="msg00284.html">Re: [MUD-Dev] Multi-threaded mud server.</A></strong>
<ul compact><li><em>From:</em> "Jon A. Lambert" &lt;jlsysinc#ix,netcom.com&gt;</li></ul>
<li><strong><A NAME="00282" HREF="msg00282.html">Re: [MUD-Dev] Multi-threaded mud server.</A></strong>
<ul compact><li><em>From:</em> Caliban Tiresias Darklock &lt;caliban#darklock,com&gt;</li></ul>
<li><strong><A NAME="00280" HREF="msg00280.html">Re: [MUD-Dev] Multi-threaded mud server.</A></strong>
<ul compact><li><em>From:</em> "Travis S. Casey" &lt;efindel#io,com&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00273" HREF="msg00273.html">Re: [MUD-Dev] Multi-threaded mud server.</A></STRONG>
<UL><LI><EM>From:</EM> Caliban Tiresias Darklock &lt;caliban#darklock,com&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00276.html">Re: [MUD-Dev] The distinction between magic spells and magic abilities</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00278.html">Re: [MUD-Dev] Custom Server Roll Call?</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00273.html">Re: [MUD-Dev] Multi-threaded mud server.</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00280.html">Re: [MUD-Dev] Multi-threaded mud server.</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00277"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00277"><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><A NAME="00309" HREF="msg00309.html">Re: [MUD-Dev] Noise: boys will be boys (was Re: [MUD-Dev] Multi-threaded mud server.)</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Thu 20 May 1999, 05:10 GMT
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00312" HREF="msg00312.html">RE: [MUD-Dev] Noise: boys will be boys (was Re: [MUD-Dev] Multi-threaded mud server.)</A></strong>, 
Koster, Raph <a href="mailto:rkoster#origin,ea.com">rkoster#origin,ea.com</a>, Thu 20 May 1999, 05:13 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00270" HREF="msg00270.html">[MUD-Dev] Multi-threaded mud server.</A></strong>, 
Ross Nicoll <a href="mailto:rnicoll#lostics,demon.co.uk">rnicoll#lostics,demon.co.uk</a>, Sun 16 May 1999, 21:09 GMT
<UL>
<LI><strong><A NAME="00273" HREF="msg00273.html">Re: [MUD-Dev] Multi-threaded mud server.</A></strong>, 
Caliban Tiresias Darklock <a href="mailto:caliban#darklock,com">caliban#darklock,com</a>, Mon 17 May 1999, 03:48 GMT
<UL>
<LI><strong><A NAME="00277" HREF="msg00277.html">Re: [MUD-Dev] Multi-threaded mud server.</A></strong>, 
Ross Nicoll <a href="mailto:rnicoll#lostics,demon.co.uk">rnicoll#lostics,demon.co.uk</a>, Mon 17 May 1999, 04:22 GMT
<UL>
<LI><strong><A NAME="00280" HREF="msg00280.html">Re: [MUD-Dev] Multi-threaded mud server.</A></strong>, 
Travis S. Casey <a href="mailto:efindel#io,com">efindel#io,com</a>, Mon 17 May 1999, 15:24 GMT
<UL>
<LI><strong><A NAME="00298" HREF="msg00298.html">Re: [MUD-Dev] Multi-threaded mud server.</A></strong>, 
Ola Fosheim Grøstad <a href="mailto:no#no,no">no#no,no</a>, Tue 18 May 1999, 06:44 GMT
</LI>
<LI><strong><A NAME="00339" HREF="msg00339.html">Re: [MUD-Dev] Multi-threaded mud server.</A></strong>, 
Ross Nicoll <a href="mailto:rnicoll#lostics,demon.co.uk">rnicoll#lostics,demon.co.uk</a>, Fri 28 May 1999, 21:04 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00282" HREF="msg00282.html">Re: [MUD-Dev] Multi-threaded mud server.</A></strong>, 
Caliban Tiresias Darklock <a href="mailto:caliban#darklock,com">caliban#darklock,com</a>, Mon 17 May 1999, 15:26 GMT
</LI>
</UL>
</LI>
</UL>
</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>

Site Stats

Snippets: 1791
Codebases: 571