[Home] [Groups] - Message: [Prev in Group] [Next in Group]
12250: Re: [MUD-Dev] Question about multithreaded servers
[Full Header] [Plain Text]
From: J C Lawrence <claw@kanga.nu>
Newsgroups: nu.kanga.list.mud-dev
Date: Tue, 18 Jan 2000 21:48:50 -0800
References: [1]
Organization: Kanga.Nu
On Tue, 18 Jan 2000 22:31:50 -0700
cg <cg@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@kanga.nu
----------(*) Other: coder@kanga.nu
--=| A man is as sane as he is dangerous to his environment |=--
_______________________________________________
MUD-Dev maillist - MUD-Dev@kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev