[MUD-Dev] Re: Output Classification Notes, version 061098

J C Lawrence claw at under.engr.sgi.com
Mon Aug 3 14:09:58 CEST 1998


On Fri, 10 Jul 1998 09:35:00 -0400 
CJones <CJones at aagis.com> wrote:

> Mike, keep us posted about your MUD development. I'm always
> interested in hearing about any technical or program hurdled you've
> come across, and how you've taken care of them.

I'll give you a hurdle that is currently costing me some sleep:

  As those of you that know my basic design may know, from a
process-level vantage my design fills the following description:

  A highly threaded application (~50 threads at rest, potentially into
the hundreds under heavy use) with a very large number of potential
contention points, a very high rate of contention checks, but a very
low rate of contention combined with contention points being held for
ralatively long periods (often based on physical IO).

   Translation: I need a synchronisation/locking mechanism that has
one of the following two characteristics (cheap contention checking is
a given as is cheap block/unblock semantics):

  1) Is extremely cheap to build and tear down, is easily identified
as unique in relation to a resource, but does not need to be able
exist in very large simultaneous numbers (ad hoc creation or
assignment per resource access).

  2) Can be created and cheaply maintained in very large numbers, one
per resource.

POSIX semaphores don't cut it -- too expensive to build and can't
create enough of them.  Virtualised semaphores (eg memory blocks of
bit flags each with access controlled by a locking semaphore attempts
to cut it but has horrible balancing problems (what happens if all
contention happens in one block with the other blocks ignored) as well
as suffering horrendously badly from the "thundering herd" problem).
  
--
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...




More information about the mud-dev-archive mailing list