<!-- MHonArc v2.4.4 --> <!--X-Subject: [MUD-Dev] Re: lockless system - foolproof? --> <!--X-From-R13: Xnzrf Ivyfba <wjvyfbaNebpurfgre.ee.pbz> --> <!--X-Date: Mon, 31 Aug 1998 20:51:22 -0700 --> <!--X-Message-Id: 98083123420100.14513@d185d1e96 --> <!--X-Content-Type: text/plain --> <!--X-Reference: E0zDMqj-0000QX-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> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] <br clear=all><hr> <!--X-Body-Begin--> <!--X-User-Header--> <!--X-User-Header-End--> <!--X-TopPNI--> Date: [ <a href="msg00895.html">Previous</a> | <a href="msg00897.html">Next</a> ] Thread: [ <a href="msg00915.html">Previous</a> | <a href="msg00900.html">Next</a> ] Index: [ <A HREF="author.html#00896">Author</A> | <A HREF="#00896">Date</A> | <A HREF="thread.html#00896">Thread</A> ] <!--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 <<A HREF="mailto:jwilson#rochester,rr.com">jwilson#rochester,rr.com</A>></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: >On Sun, 30 Aug 1998 20:36:11 -0400 >James Wilson<jwilson#rochester,rr.com> wrote: >> On Sun, 30 Aug 1998, J C Lawrence wrote: >>> On Sat, 29 Aug 1998 19:42:17 -0400 James >>> Wilson<jwilson#rochester,rr.com> wrote: > >>> The easiest and perhaps the simplest way of attacking this is thru >>> approaching the level of parallelism in your execution model. >>> Again, taking the pessimal case, if the execution model degrades >>> until only one event is executing at a time, then X is guaranteed >>> to successfully C&C when its turn comes as there is no competition. >>> >>> This is the approach I take. Events enter the Executor with a >>> "priority" value. As events fail C&C they accumulate priority. >>> The executor's execution model then adapts dynamically per the >>> highest priority event on its list. At one end its the normal >>> unrestrained competition between events, and t the other it >>> degrades to single-tasking with everal stages in between. [snip] >> You mentioned that you are designing with user scripting in mind. If >> one of those contentious events ends up getting a monopoly on cpu >> time, *and* it's of long/indefinite duration (which would seem to >> correlate nicely with the propensity for contentiousness), >> everything would freeze waiting for it. > >Pessimally, nearly yes. In practice no. The game-wide event thru-put >will (fairly rapidly) degrade to single-tasking, and then resume >immediately with normal processing. Should the offensive event be a >raid respawner (ie there are many such events and/or each one creates >further like itself) which is the ultimately pessimal case, the game >will enter a yo-yo-like state of constantly entering single-tasking >mode and then leaving it. > >However such excessively contentious events are easy to detect and >guard against. Here, I (used to) run a little statistics monitor that >would note any events that took the game to or near single tasking >mode, and if the repeated more than once an hour, would spoof the >defining object and freeze the event calls for admin intervention. so you've essentially disallowed these contentious-by-nature events, right? >> While some might say it seems a bad idea to allow users to write >> long-running functions, a scripting system would seem to me to be >> most useful to builders wanting to add new functionality to the >> world without having to muck about in the source code. [snip] >That said, much like the old argument of C vs Pascal, free scripting >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. >> In this case, putting bounds on running time would be a serious >> constraint on builder creativity. Ideally, bounding runtimes should >> be a matter of policy rather than forced by the implementation. > >Disagreed, strongly. The reason is actually simple: I find that >extremely long running or contentious events are actually of flawed >base design. There is always another divisional structure that allows >the same result to be accomplished with less contention points, and >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] >This is the sort of things which I am unwilling to proof against. I'm >willing to make the system withstand such onslaughts (monolithinc long >running events), which it currently does, but I am not willing to >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 <claw#under,engr.sgi.com></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 <claw#kanga,nu></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> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] </center> <hr> </body> </html>