[MUD-Dev] Re: TECH: Distributed Muds

Daniel.Harman at barclayscapital.com Daniel.Harman at barclayscapital.com
Wed May 16 10:41:44 New Zealand Standard Time 2001

> -----Original Message-----
> From: asnellin at san.rr.com [mailto:asnellin at san.rr.com]
> Sent: 15 May 2001 21:50
> To: mud-dev at kanga.nu
> Subject: Re: [MUD-Dev] Re: TECH: Distributed Muds
> Actually, it's more like a constant number of threads per
> connection, likely only one or two. But that's why I'm asking these
> questions -- would N*2 threads kill a system, even if intelligently
> managed? Even if 90% of them were blocking at any given point in
> time?

That really wouldn't scale well on any OS that I'm aware of. You might
want to consider a thread pool to which you allocate units of work as
and when requests are received. To just add more and more threads in
will lead to heartache and pain. Remember, the optimal number of
threads is generally the number of CPUs in your system assuming that
they aren't sat waiting on events doing no processing.

As an aside you may want to consider picking up a book on this topic
for whichever OS you are developing for if you aren't already fully
aware of these issues. Multi-threading is very complex (especially to
debug), and unless you know exactly what you are doing, you could well
write something that will _never_ work. One needs to be aware of all
the synchronisation issues caused by multiple threads when they share

MUD-Dev mailing list
MUD-Dev at kanga.nu

More information about the MUD-Dev mailing list