1998Q3/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: lockless system &#45; foolproof? -->
<!--X-From-R13: Xnzrf Ivyfba <wjvyfbaNebpurfgre.ee.pbz> -->
<!--X-Date: Mon, 31 Aug 1998 20:51:22 &#45;0700 -->
<!--X-Message-Id: 98083123420100.14513@d185d1e96 -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: E0zDMqj&#45;0000QX&#45;00#mail,kanga.nu -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Re: lockless system - foolproof?</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:jwilson#rochester,rr.com">
</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="msg00895.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00897.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00915.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00900.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00896">Author</A>
&nbsp;|&nbsp;<A HREF="#00896">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00896">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: lockless system - foolproof?</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>: [MUD-Dev] Re: lockless system - foolproof?</LI>
<LI><em>From</em>: James Wilson &lt;<A HREF="mailto:jwilson#rochester,rr.com">jwilson#rochester,rr.com</A>&gt;</LI>
<LI><em>Date</em>: Mon, 31 Aug 1998 08:38:35 -0400</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#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 Mon, 31 Aug 1998, J C Lawrence wrote:
&gt;On Sun, 30 Aug 1998 20:36:11 -0400 
&gt;James Wilson&lt;jwilson#rochester,rr.com&gt; wrote:
&gt;&gt; On Sun, 30 Aug 1998, J C Lawrence wrote:
&gt;&gt;&gt; On Sat, 29 Aug 1998 19:42:17 -0400 James
&gt;&gt;&gt; Wilson&lt;jwilson#rochester,rr.com&gt; wrote:
&gt;
&gt;&gt;&gt; The easiest and perhaps the simplest way of attacking this is thru
&gt;&gt;&gt; approaching the level of parallelism in your execution model.
&gt;&gt;&gt; Again, taking the pessimal case, if the execution model degrades
&gt;&gt;&gt; until only one event is executing at a time, then X is guaranteed
&gt;&gt;&gt; to successfully C&amp;C when its turn comes as there is no competition.
&gt;&gt;&gt; 
&gt;&gt;&gt; This is the approach I take.  Events enter the Executor with a
&gt;&gt;&gt; "priority" value.  As events fail C&amp;C they accumulate priority.
&gt;&gt;&gt; The executor's execution model then adapts dynamically per the
&gt;&gt;&gt; highest priority event on its list.  At one end its the normal
&gt;&gt;&gt; unrestrained competition between events, and t the other it
&gt;&gt;&gt; degrades to single-tasking with everal stages in between.

[snip]

&gt;&gt; You mentioned that you are designing with user scripting in mind. If
&gt;&gt; one of those contentious events ends up getting a monopoly on cpu
&gt;&gt; time, *and* it's of long/indefinite duration (which would seem to
&gt;&gt; correlate nicely with the propensity for contentiousness),
&gt;&gt; everything would freeze waiting for it.
&gt;
&gt;Pessimally, nearly yes.  In practice no.  The game-wide event thru-put
&gt;will (fairly rapidly) degrade to single-tasking, and then resume
&gt;immediately with normal processing.  Should the offensive event be a
&gt;raid respawner (ie there are many such events and/or each one creates
&gt;further like itself) which is the ultimately pessimal case, the game
&gt;will enter a yo-yo-like state of constantly entering single-tasking
&gt;mode and then leaving it.
&gt;
&gt;However such excessively contentious events are easy to detect and
&gt;guard against.  Here, I (used to) run a little statistics monitor that
&gt;would note any events that took the game to or near single tasking
&gt;mode, and if the repeated more than once an hour, would spoof the
&gt;defining object and freeze the event calls for admin intervention.

so you've essentially disallowed these contentious-by-nature events, right?

&gt;&gt; While some might say it seems a bad idea to allow users to write
&gt;&gt; long-running functions, a scripting system would seem to me to be
&gt;&gt; most useful to builders wanting to add new functionality to the
&gt;&gt; world without having to muck about in the source code. 

[snip]

&gt;That said, much like the old argument of C vs Pascal, free scripting
&gt;on MUDs is akin to handing chainguns with hari triggers to monkeys.

heh.

Seriously, I am reconsidering my own attachment to user scripting, in
light of this whole threading issue.

&gt;&gt; In this case, putting bounds on running time would be a serious
&gt;&gt; constraint on builder creativity. Ideally, bounding runtimes should
&gt;&gt; be a matter of policy rather than forced by the implementation.
&gt;
&gt;Disagreed, strongly.  The reason is actually simple: I find that
&gt;extremely long running or contentious events are actually of flawed
&gt;base design.  There is always another divisional structure that allows
&gt;the same result to be accomplished with less contention points, and
&gt;often with far greater elegance.

[example snipped]

I guess there's two issues here. First, is everything that is possible
with contentious events possible with equivalent non-contentious events? 
I would think not, but perhaps enough functionality would remain to still
make the system practical. I'm no computer scientist, so I'll leave 
the formal proofs to someone else. ;) Second, what degree of skill would 
users need to have to properly script non-contentious events?

[snip]

&gt;This is the sort of things which I am unwilling to proof against.  I'm
&gt;willing to make the system withstand such onslaughts (monolithinc long
&gt;running events), which it currently does, but I am not willing to
&gt;require the system to perform well under such (it doesn't).

Agreed. As long as a system is powerful enough, it will be vulnerable in 
some sense (if only to resource attacks). I don't think there's a way
around this, just different sets of tradeoffs.

James


</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="00900" HREF="msg00900.html">[MUD-Dev] Re: lockless system - foolproof?</A></strong>
<ul compact><li><em>From:</em> J C Lawrence &lt;claw#under,engr.sgi.com&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00883" HREF="msg00883.html">[MUD-Dev] Re: lockless system - foolproof?</A></STRONG>
<UL><LI><EM>From:</EM> J C Lawrence &lt;claw#kanga,nu&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00895.html">[MUD-Dev] Re: Modular MUD</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00897.html">[MUD-Dev] Re: Modular MUD</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00915.html">[MUD-Dev] Re: lockless system - foolproof?</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00900.html">[MUD-Dev] Re: lockless system - foolproof?</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00896"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00896"><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>[MUD-Dev] Re: lockless system - foolproof?</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00886" HREF="msg00886.html">[MUD-Dev] Re: lockless system - foolproof?</A></strong>, 
T. Alexander Popiel <a href="mailto:popiel#snugharbor,com">popiel#snugharbor,com</a>, Mon 31 Aug 1998, 14:42 GMT
<UL>
<LI><strong><A NAME="00899" HREF="msg00899.html">[MUD-Dev] Re: lockless system - foolproof?</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Tue 01 Sep 1998, 17:50 GMT
<UL>
<LI><strong><A NAME="00903" HREF="msg00903.html">[MUD-Dev] Re: lockless system - foolproof?</A></strong>, 
T. Alexander Popiel <a href="mailto:popiel#snugharbor,com">popiel#snugharbor,com</a>, Wed 02 Sep 1998, 04:57 GMT
<UL>
<LI><strong><A NAME="00915" HREF="msg00915.html">[MUD-Dev] Re: lockless system - foolproof?</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Wed 02 Sep 1998, 20:50 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00896" HREF="msg00896.html">[MUD-Dev] Re: lockless system - foolproof?</A></strong>, 
James Wilson <a href="mailto:jwilson#rochester,rr.com">jwilson#rochester,rr.com</a>, Tue 01 Sep 1998, 03:51 GMT
<UL>
<LI><strong><A NAME="00900" HREF="msg00900.html">[MUD-Dev] Re: lockless system - foolproof?</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Tue 01 Sep 1998, 18:08 GMT
</LI>
</UL>
</LI>
</ul>
</ul>
</ul>
</ul>
</LI>
<LI><strong><A NAME="00868" HREF="msg00868.html">[MUD-Dev] Quake 3:  How to do OpenGL</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Fri 28 Aug 1998, 02:40 GMT
<LI><strong><A NAME="00864" HREF="msg00864.html">[MUD-Dev] Re: The 'consider' command</A></strong>, 
Damion Schubert <a href="mailto:zjiria#texas,net">zjiria#texas,net</a>, Thu 27 Aug 1998, 05:11 GMT
<UL>
<LI><strong><A NAME="00866" HREF="msg00866.html">[MUD-Dev] Re: The 'consider' command</A></strong>, 
Jon Leonard <a href="mailto:jleonard#divcom,slimy.com">jleonard#divcom,slimy.com</a>, Thu 27 Aug 1998, 07:08 GMT
</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>