1997Q1/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: Threads, IO handling, and Event Queues -->
<!--X-From-R13: "Qnegre F Eubpx" <pgfbNhzvnpf.hzq.rqh> -->
<!--X-Date: from major.globecomm.net [207.51.48.5] by mx01.ny.us.ibm.net id 858002379.103758&#45;1 Mon Mar 10 13:59:39 1997 -->
<!--X-Message-Id: 199703101359.NAA16228#lupa,umiacs.umd.edu -->
<!--X-Content-Type: text/plain -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: Threads, IO handling, and Event Queues</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:ctso#umiacs,umd.edu">
</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="msg00081.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00083.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00075.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00084.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00082">Author</A>
&nbsp;|&nbsp;<A HREF="#00082">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00082">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: Threads, IO handling, and Event Queues</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: &lt;<A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A>&gt;</LI>
<LI><em>Subject</em>: Re: Threads, IO handling, and Event Queues</LI>
<LI><em>From</em>: "Carter T Shock" &lt;<A HREF="mailto:ctso#umiacs,umd.edu">ctso#umiacs,umd.edu</A>&gt;</LI>
<LI><em>Date</em>: Mon, 10 Mar 1997 08:53:30 -0500</LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
&gt; As for multi-threading, I would advocate understanding why you want to
&gt; use it, before you devote much time to it. A program with multiple
&gt; threads will run slower on a single-CPU computer than the equivalent
&gt; program without threads. If you truly are targetting speedups by running
&gt; on multiple CPU's, then fine. If not, then reorganizing your server into
&gt; threads had better produce some real improvements in maintainability,
&gt; etc., in order to offset the loss of speed.
&gt; 

I agree that multi-threading is not an issue to be taken lightly. I'd
suggest that it only applies to the mud if you want to run different hunks
of your world asynchronously. You could run different regions as seperate
threads, unloading the threads when the region is devoid of players to
reduce load. You could also run with each user as a seperate thread, but I
wouldn't recommend it.

A shared memory solution has some interesting advantages over threads for
handling players and such. Sure, shared memory (and processes that
communicate via semaphores and such) is a cheap way to get threads. The
main advantage to using shared memory segments to hold the mud's data is
that you can attach any process to the memory segment. Consider:
	- you can develop admin tools that attach to the mud process but don't 	 
require you to log in as a "player"
	- you can develop "builder" clients that allow your build crew to attach
to 	  the mud and work, but don't allow interaction with the players (if
yer 	  gonna build, BUILD, if yer gonna play, PLAY.)

One of the things I like about SillyMUD is the catastrophe code. The goblin
raid on a town, the dwarf miner's revolt, etc. No reason you can't code up
these "events" as a seperate process that runs, attaches to the mud, loads
and tracks the appropriate critters, plays out its scenario and then cleans
up after itself. In essence, if you design well, you should be able to
dynamically modify what's going on in your world without having to reboot.


</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00081.html">mud grammar (was Re: Just a bit of musing)</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00083.html">Re: mud grammar (was Re: Just a bit of musing)</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00075.html">Re: Threads, IO handling, and Event Queues</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00084.html">Re: Threads, IO handling, and Event Queues</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00082"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00082"><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: Threads, IO handling, and Event Queues</STRONG>, <EM>(continued)</EM>
<ul compact>
<LI><strong><A NAME="00066" HREF="msg00066.html">Re: Threads, IO handling, and Event Queues</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Thu 06 Mar 1997, 23:49 GMT
</LI>
<LI><strong><A NAME="00067" HREF="msg00067.html">Re: Threads, IO handling, and Event Queues</A></strong>, 
coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Sat 08 Mar 1997, 11:38 GMT
</LI>
<LI><strong><A NAME="00074" HREF="msg00074.html">Re: Threads, IO handling, and Event Queues</A></strong>, 
coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Sat 08 Mar 1997, 11:54 GMT
</LI>
<LI><strong><A NAME="00075" HREF="msg00075.html">Re: Threads, IO handling, and Event Queues</A></strong>, 
coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Sat 08 Mar 1997, 13:44 GMT
</LI>
<LI><strong><A NAME="00082" HREF="msg00082.html">Re: Threads, IO handling, and Event Queues</A></strong>, 
Carter T Shock <a href="mailto:ctso#umiacs,umd.edu">ctso#umiacs,umd.edu</a>, Mon 10 Mar 1997, 21:59 GMT
</LI>
<LI><strong><A NAME="00084" HREF="msg00084.html">Re: Threads, IO handling, and Event Queues</A></strong>, 
Nathan Yospe <a href="mailto:yospe#hawaii,edu">yospe#hawaii,edu</a>, Tue 11 Mar 1997, 03:09 GMT
</LI>
<LI><strong><A NAME="00113" HREF="msg00113.html">Re: Threads, IO handling, and Event Queues</A></strong>, 
claw <a href="mailto:claw#null,net">claw#null,net</a>, Sat 15 Mar 1997, 07:41 GMT
</LI>
</ul>
</LI>
<LI><strong><A NAME="00053" HREF="msg00053.html">ListMail dupes</A></strong>, 
coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Wed 05 Mar 1997, 14:38 GMT
<LI><strong><A NAME="00044" HREF="msg00044.html">Issues from the digests and Wout's list</A></strong>, 
Alex Oren <a href="mailto:alexo#europa,com">alexo#europa,com</a>, Mon 03 Mar 1997, 20:08 GMT
</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>