[MUD-Dev] Question about multithreaded servers

J C Lawrence claw at kanga.nu
Tue Jan 18 21:48:50 New Zealand Daylight Time 2000

On Tue, 18 Jan 2000 22:31:50 -0700 
cg  <cg at ami-cg.GraySage.Edmonton.AB.CA> wrote:

> [Greg Underwood:]
>>>>> I suppose just by making a simple requirement that all
>>>>> objects must be secured at the begining of the cript would
>>>>> take care of that.

Ahem.  Attribution?

>> No, that's not true.  Just because you attempt to lock everything
>> before you execute the script doesn't mean you avoid deadlocks.

> Perhaps the original writer was assuming that all the locks are
> acquired at once. An example of that is the SysV locking stuff in
> some versions of UNIX. It's ugly as sin, but essentially allows
> you to do a whole mess of lock operations all at once, atomically.

That requires you to know the full list of to-be-locked resources in
advance, something which is not necessarily difficult in an OS
context with its clearly defined call tree semantics, but can be an
utter bitch in a MUD.  This is one of the major reasons I went with
the lockeless model.  Going for a hard lock model looked fraught
with Oh-damn-I-forgot-about-that's.

J C Lawrence                                 Home: claw at kanga.nu
----------(*)                              Other: coder at kanga.nu
--=| A man is as sane as he is dangerous to his environment |=--

MUD-Dev maillist  -  MUD-Dev at kanga.nu

More information about the MUD-Dev mailing list