msg00087.html

2000Q1/msg00087.html · 7.5 KB

From the archive 2000Q1.zip

Download the archive   « Back to the archive contents

<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev] Question about multithreaded servers -->
<!--X-From-R13: "OD Epuyrvpure" <nefNvnt.arg> -->
<!--X-Date: Fri, 14 Jan 2000 13:48:28 &#45;0800 -->
<!--X-Message-Id: 002c01bf5ed8$6505f7a0$04f9a0cd#qualkids,com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: Pine.SOL.4.10.10001141100200.5830&#45;100000#earth,execpc.com -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev] Question about multithreaded servers</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:ars#iag,net">
</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="msg00086.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00088.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00085.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00241.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00087">Author</A>
&nbsp;|&nbsp;<A HREF="#00087">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00087">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] Question about multithreaded servers</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: &lt;<A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A>&gt;</LI>
<LI><em>Subject</em>: Re: [MUD-Dev] Question about multithreaded servers</LI>
<LI><em>From</em>: "AR Schleicher" &lt;<A HREF="mailto:ars#iag,net">ars#iag,net</A>&gt;</LI>
<LI><em>Date</em>: Fri, 14 Jan 2000 15:24:38 -0500</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>

----- Original Message -----
From: Fabian Lemke &lt;lemkef#execpc,com&gt;
&gt; The only solution I can think of is to have a seperate thread for
&gt; executing scripts, but 95% of the time scripts won't need to access
&gt; out-of-area objects.
&gt;
&gt; Any ideas how this can be solved?  I'm somewhat new to multi-threading,
&gt; but am pretty sure I have a solid grasp on it all, but I've little design
&gt; experience in it.

While you're worried about deadlocks from using a locking mechanism, I think
it's the way to go.  You need to design your system so that a thread can
release all the locks it has if it fails to get one it wants.  Depending on
the details of your system, this may mean a) ok, record the locks I have,
release them all, and wait until I can get them all back at once, or b) ok,
I'll put that action on hold, and continue processing what I can in this
thread, and then I'll try that lock again next cycle through my loop.
(Which assumes the end of the cycle releases all the locks for a bit, so
that other threads can get them.)

There are other options (such as locking in a specific order) which can also
work, for some systems.

A warning regarding my advice, it's based on a server I wrote a little over
a year ago, and basically gave up on, due largely to the fact that I hadn't
thought this issue all the way through before coding, and had setup
situations where I could potentially deadlock.  Fixing it would have
required more time than I wanted to spend then,  so I never got around to
actually implementing my advice.  :)

AR Schleicher (Jerrith)
ars#iag,net





_______________________________________________
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>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00085" HREF="msg00085.html">[MUD-Dev] Question about multithreaded servers</A></STRONG>
<UL><LI><EM>From:</EM> Fabian Lemke &lt;lemkef#execpc,com&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00086.html">[MUD-Dev] Community Relations</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00088.html">Re: [MUD-Dev] Question about multithreaded servers</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00085.html">[MUD-Dev] Question about multithreaded servers</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00241.html">Re: [MUD-Dev] Question about multithreaded servers</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00087"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00087"><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] Community Relations</STRONG>, <EM>(continued)</EM>
<ul compact>
<LI><strong><A NAME="00266" HREF="msg00266.html">RE: [MUD-Dev] Community Relations</A></strong>, 
Geoffrey A. MacDougall <a href="mailto:geoffrey#poptronik,com">geoffrey#poptronik,com</a>, Thu 03 Feb 2000, 17:18 GMT
<UL>
<LI><strong><A NAME="00267" HREF="msg00267.html">RE: [MUD-Dev] Community Relations</A></strong>, 
Matthew Mihaly <a href="mailto:diablo#best,com">diablo#best,com</a>, Thu 03 Feb 2000, 20:58 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00280" HREF="msg00280.html">Re: [MUD-Dev] Community Relations</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Tue 08 Feb 2000, 19:07 GMT
</LI>
</ul>
</LI>
<LI><strong><A NAME="00085" HREF="msg00085.html">[MUD-Dev] Question about multithreaded servers</A></strong>, 
Fabian Lemke <a href="mailto:lemkef#execpc,com">lemkef#execpc,com</a>, Fri 14 Jan 2000, 18:38 GMT
<UL>
<LI><strong><A NAME="00087" HREF="msg00087.html">Re: [MUD-Dev] Question about multithreaded servers</A></strong>, 
AR Schleicher <a href="mailto:ars#iag,net">ars#iag,net</a>, Fri 14 Jan 2000, 21:48 GMT
</LI>
<LI><strong><A NAME="00241" HREF="msg00241.html">Re: [MUD-Dev] Question about multithreaded servers</A></strong>, 
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Sun 30 Jan 2000, 19:22 GMT
<UL>
<LI><strong><A NAME="00253" HREF="msg00253.html">datagram protocol design theory? (Re: [MUD-Dev] Question about multithreaded servers)</A></strong>, 
Ola Fosheim Grøstad <a href="mailto:olag#ifi,uio.no">olag#ifi,uio.no</a>, Mon 31 Jan 2000, 23:35 GMT
</LI>
</UL>
</LI>
</UL>
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00088" HREF="msg00088.html">Re: [MUD-Dev] Question about multithreaded servers</A></strong>, 
Nick Shaffner <a href="mailto:nicks#3drealms,com">nicks#3drealms,com</a>, Sat 15 Jan 2000, 00:30 GMT
<UL>
<LI><strong><A NAME="00094" HREF="msg00094.html">Re: [MUD-Dev] Question about multithreaded servers</A></strong>, 
Ola Fosheim Grøstad <a href="mailto:olag#ifi,uio.no">olag#ifi,uio.no</a>, Sun 16 Jan 2000, 01:56 GMT
</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