[MUD-Dev] Re: atomic functions

Felix A. Croes felix at xs1.simplex.nl
Fri May 8 14:48:33 New Zealand Standard Time 1998


J C Lawrence <claw at under.engr.sgi.com> wrote:

>[...]
>   In the C&C model, the only time an event fails C&C and has to
> reschedule is when another event managed to successfully C&C during
> its execution.  That's the only way you can get a changed object to
> cause the C&C failure.  Or to put it another way, given N executing or 
> about to be executing events, at the end of the iteration you are
> guaranteed that at least one of them will successfully C&C.
>
> The only reason to degrade the threading model down towards
> single-tasking is if you have an event which needs to compleat, but is 
> failing due to C&C failures caused by other more sprightly events
> "getting in there first".  The classic scenario on-list is Bubba
> digging the Panama Canal.
>
>   eg If the "dig panama canal" event were coded to do the whole thing in a
> single very long execution, you are it is likely that it would never
> C&C due to other shorter/faster events getting in and touching objects 
> before the "big event" compleats.  
>
> C&C has guaranteed thru-put, it just doesn't guarantee much more than
> a trickle.

Putting this into perspective: even if each event collides with all
others, the system will be almost as fast on a multi-processor machine
as a single-threaded system would be.  On average it will be much
faster.  Much can be done to reduce the number of failing events.

You mentioned that C&C is not a godsend.  It is to me, as I am not
starting from scratch but already have a full-fledged mud server
which I want to let take advantage of today's fastest hardware.  As
it happens, all of the design decisions I had previously made for
other reasons now make adding C&C to my server easier -- for
example, the infrastructure for making a local copy of data when
required is already in place.

I also like C&C for its simple, ruthless elegance, and for allowing
me to avoid the complex semantics of a system that is multi-threaded
on the mud's programming language level.


> Musing: Do you think when 50 years from now someone does a
> restrospective or history of the early years of VR...there'll be an
> entry under "Bubba"?

BUBBA, the first word in the activator phrase of an outlawed memetic
structure which, for obvious reasons, cannot be fully repeated here:
"Bubba D. the P. C."  Blamed for motivating the Second Uprising.
Sealed by Imperial Order in 2035.

Felix Croes

--
MUD-Dev: Advancing an unrealised future.



More information about the MUD-Dev mailing list