[MUD-Dev] Multi-threaded mud server.

Ross Nicoll rnicoll at lostics.demon.co.uk
Fri May 28 19:59:12 CEST 1999


Sorry for the delay replying, been busy with exams.

On Sun, 16 May 1999, David Bennett wrote:

> >Semaphores were the original plan, but as I understand it, this would
> >require a new semaphore for each object. As we're looking at 10,000+
> >objects, that's a _lot_ of semaphores.
> Well...  You could do a system that only generated a semphore when it was
> needed...  As in you have some nice bit you set in the structure for
> reading/writing and another bit you set for being locked.  Then if it goes
> to do a normal semphore unlock and it finds that a semaphore is needed it
> grabs it correctly.  Or just waits on an event or something.
Good idea, but unfortunately it's still possible two processes to
simultaneously do the check, find no semaphore, and both to then try
allocating a semaphore, at the same time. Which would just result in a
mess, really...

> You can also divide the objects up into groups and then do read locks and
> write locks on the group as a whole.  Or (as is mentioned by Caliban)
> divide the system up into tasks.
*nods* this I might be doing, with the splits being done by where the
objects are in the "world".
--
  _   __  __  __
 /_) / / (_  (__
/\  /_/  __)   /
______________/



_______________________________________________
MUD-Dev maillist  -  MUD-Dev at kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev




More information about the mud-dev-archive mailing list