[MUD-Dev] Re: MUD Development Digest

Jon Leonard jleonard at divcom.umop-ap.com
Fri Apr 10 12:31:05 New Zealand Standard Time 1998

On Fri, Apr 10, 1998 at 11:51:01AM +0000, Chris Gray wrote:
> [Alex O:]
> [Fibre description snipped]
> :I don't any advantage in using fibers instead of threads in a MUD server.
> I'll second that. Fibres within a thread cannot take advantage of extra
> CPU's, so give you no speed increase on multi-CPU machines. If a fibre
> does a system call, the entire thread is busy until that call returns.
> So, unless you have some flow-control problem that is best solved by
> having the multiple contexts of multiple fibres, and you need to switch
> those contexts so often that threads are too expensive, there is little
> gain to using fibres.

The one advantage they would have is that mutual exclusion code doesn't
have to be written as carefully:  context switches are known not to happen
in critical regions.

In other words, some kinds of broken code will still run.  It's not worth it.

It's the cooperative/preemptive multitasking tradoffs all over again.

Jon Leonard

More information about the MUD-Dev mailing list