[MUD-Dev] TECH DGN: a few mud server design questions (long)
Jon Lambert
tychomud at ix.netcom.com
Sat Dec 22 23:42:04 CET 2001
J C Lawrence wrote:
> There are at least two methods that have been extensively
> discussed on this list, the C&C model I use, and Jon Lambert's
> model (which doesn't suffer the penalty of having a cute name).
I felt I was under enormous pressure <tongue in cheek> to come up
with a handy name and when I did I'd misnamed it badly. I called it
S&S or Spin-lock and Swizzle just to be alliteratively compatible
(or competitive) with C&C. Of course the swizzle part is quite
_wrong_ since swizzling more properly refers to mechanisms of
converting external addresses, names, indexes, tokens, whatever,
into real storage address pointers. What I'm really "swizzling" is
before and after memory images. The C++ image pointer idiom
(rf. Coplien, Alger, prolly others) is used as a building block to
implement simple in-memory journaling for transactions. The before
image for rollback, the after image for commit. Sadly there just
ain't any good pithy "S" in that. Oh well...
The spin-lock part is accurate. Spin-locks are used in a number of
OSs to synchronize access to memory. OS/390 memory paging and
inside IRLM (Inter-region Lock Manager). I believe from what I've
read that spin-locks are what is used inside some of the Linux
posixy parts _now_. Anyways spin-locks are easily implemented under
NT or most *nixes using synchronization primitives. What you do is
waste a few processor cycles in a thread by repeatedly trying obtain
a lock instead of going to sleep right away. The hope is that most
locks will be of short enough duration.
In any case the model I'm using is neither novel nor original and is
very much my best guesses at common models used under the covers in
many RDBMs. Anyone intimate with the internals of IBM's IRLM as it
interfaces to IMS and DB2 would recognize it.
--
--* Jon A. Lambert - TychoMUD Email:jlsysinc at ix.netcom.com *--
--* Mud Server Developer's Page <http://tychomud.home.netcom.com> *--
--* If I had known it was harmless, I would have killed it myself.*--
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev
More information about the mud-dev-archive
mailing list