[MUD-Dev] Re: atomic functions
J C Lawrence
claw at under.engr.sgi.com
Thu May 7 15:57:02 New Zealand Standard Time 1998
On Tue, 5 May 1998 14:52:12 +0200 (MET DST)
Felix A Croes<felix at xs1.simplex.nl> wrote:
> Jon A. Lambert <jlsysinc at ix.netcom.com> wrote:
>> I don't see how any threads are guaranteed execution in C&C, unless
>> they are evntually escalated to single-threading as per your
>> earlier reference. How does atomic prevent another thread from
>> accessing and updating objects, unless you single thread/task it?
> What I wrote is wrong -- if N events are executing and the first one
> to complete succeeds, then the ones that complete after that may all
> fail, so after completion of the first event, none of the events
> executing at that moment will succeed. But in C&C, an event that is
> itself doomed cannot block the progress of another event. Since an
> event can only be doomed by another event that already completed
> successfully, progress is guaranteed in the system as a whole. In
> the worst case scenario above, one event would immediately complete
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
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"?
BTW: Jon, how do you handle IO for event failures? Buffer and
J C Lawrence Internet: claw at null.net
(Contractor) Internet: coder at ibm.net
---------(*) Internet: claw at under.engr.sgi.com
...Honourary Member of Clan McFud -- Teamer's Avenging Monolith...
MUD-Dev: Advancing an unrealised future.
More information about the MUD-Dev