Re: Languages

From: Christian Loth (
Date: 03/07/99

Am Son, 06 Mar 1999 schrieb Andrew Ritchie:
> >I was trying to figure out once - is there a minimum number of threads
> >mandated in the standard?  i.e. that all implementations must support
> >at least 128 threads or something?  I keep wondering if
> >one-thread-per-player, which has some very nice benefits, is worth the
> >performance cost.  (The other end of the spectrum being a Squid-like
> >design of a single thread that never, ever blocks for any reason --
> >even asynch I/O)
> For a one-thread-per-player-system, wouldn't you have to make sure that
> global variables aren't being accessed at the same time by two or more
> different threads? That's what I was told, anyhow. So you'd need a flagging
> variable on each global variable (or even on playing structures, seeing as
> they can be accessed by different threads) ... kind of like a INUSE/FREE
> thing. This would be mighty troublesome, wouldn't you agree?

Well, you can have a mutex per class, and of course, the
coding effort would be somewhat higher than using the
'polling' that circle does atm. But there are also plusses.
However those plusses are not that critical on a UP
system. With an SMP system however, you have quite
some impact. But even on UP systems, a mud might seem
more 'fluid' (one thread won't block the other...).

However, if synchronisation isn't done properly, you can
run into a whole new wonderful world of mysterious buglets ;)

- Chris

Christian Loth
Coder of 'Project Gidayu'
Computer Science Student, University of Dortmund -

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 12/15/00 PST