msg00094.html

2000Q1/msg00094.html · 8.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: Ayn Tbfurvz =?vfb&#45;8859&#45;1?C?Ue=T8fgnq?= <byntNvsv.hvb.ab> -->
<!--X-Date: Sat, 15 Jan 2000 17:56:35 &#45;0800 -->
<!--X-Message-Id: 3880F03B.7F4D5D33#ifi,uio.no -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 004601bf5ee6$91b1c960$5d01a8c0#Nick,Nick -->
<!--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:olag#ifi,uio.no">
</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="msg00096.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00095.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00088.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00101.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00094">Author</A>
&nbsp;|&nbsp;<A HREF="#00094">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00094">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>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Subject</em>: Re: [MUD-Dev] Question about multithreaded servers</LI>
<LI><em>From</em>: Ola Fosheim Grøstad &lt;<A HREF="mailto:olag#ifi,uio.no">olag#ifi,uio.no</A>&gt;</LI>
<LI><em>Date</em>: Sat, 15 Jan 2000 23:10:03 +0100</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>
Nick Shaffner wrote:
&gt; &gt;but I'm worried about deadlocks because
&gt; &gt;I want objects locked during the whole script so nothing can be changed on
&gt; &gt;me.
&gt; 
&gt;     IMHO, this is the root of your problem (locking objects for the whole
&gt; script).  By nature, deadlocks are far more likely to occur when you have
&gt; entire objects locked, even when they don't need to be.  In general, you
&gt; should strive to hold as few object locks as possible for as short a period
&gt; as possible - though even then you will still get the occasional deadlock.

I don't get this.  Maybe I have misinterpreted something?  It is rather
obvious that if you acquire all the limited resources you need for the
rest of the script in one go (an atomic operation) then a deadlock is
impossible (provided that your script eventually terminates). 
Starvation is another issue, of course. 

I'm not convinced that message passing (events) alleviates the basic
synchronization problem, but you seemed to suggest that? Care to explain
how you would do this in an elegant and practical eventengine? Simple
example: "consume two different resources administered by two different
entities, but only if you can get both". It is obviously not to
difficult to come up with some solution to this simple example, but I
can't think of any attractive solution.

In a real-time programming environment I would assume that a rollback
scheme is the most attractive solution, basically because you cannot
prevent screw ups in a situation like that. You have to be able to cover
situations where a script doesn't terminate etc. Without rollback you
have to restrict yourself to a design where only trivial transformations
are possible. (non-trivial being custom transformations where the
consumption of one or more resources must result in the production of
some other resource for the universe to remain consistent). One obvious
advantage with a functional (transaction  like) approach is that you can
allow users more freedom and assert that the universe invariants are not
violated before committing them rather than limiting the basic operators
they have access to.

(btw, has "tupple spaces", such as Linda, been discussed on mud-dev
before?)

Ola.





_______________________________________________
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="00101" HREF="msg00101.html">RE: [MUD-Dev] Question about multithreaded servers</A></strong>
<ul compact><li><em>From:</em> "Fabian" &lt;lemkef#execpc,com&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00088" HREF="msg00088.html">Re: [MUD-Dev] Question about multithreaded servers</A></STRONG>
<UL><LI><EM>From:</EM> "Nick Shaffner" &lt;nicks#3drealms,com&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00096.html">[MUD-Dev] Databases (was Re: Commercial-use Restrictions on Code Bases)</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00095.html">Re: player politics (was RE: [MUD-Dev] An introduction...)</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00088.html">Re: [MUD-Dev] Question about multithreaded servers</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00101.html">RE: [MUD-Dev] Question about multithreaded servers</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00094"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00094"><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] Question about multithreaded servers</STRONG>, <EM>(continued)</EM>
<ul compact>
<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>
<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
<UL>
<LI><strong><A NAME="00101" HREF="msg00101.html">RE: [MUD-Dev] Question about multithreaded servers</A></strong>, 
Fabian <a href="mailto:lemkef#execpc,com">lemkef#execpc,com</a>, Sun 16 Jan 2000, 19:12 GMT
<UL>
<LI><strong><A NAME="00243" HREF="msg00243.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, 21:27 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00103" HREF="msg00103.html">Re: [MUD-Dev] Question about multithreaded servers</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Mon 17 Jan 2000, 09:02 GMT
<UL>
<LI><strong><A NAME="00129" HREF="msg00129.html">RE: [MUD-Dev] Question about multithreaded servers</A></strong>, 
Fabian <a href="mailto:lemkef#execpc,com">lemkef#execpc,com</a>, Tue 18 Jan 2000, 20:51 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