[Home] [Groups] - Message: [Prev in Group] [Next in Group]
5496: Re: [MUD-Dev] Re: MUD Development Digest
[Full Header] [Plain Text]
From: Jon Leonard <jleonard@divcom.umop-ap.com>
Newsgroups: nu.kanga.list.mud-dev
Date: Fri, 10 Apr 1998 12:31:05 -0700
References: [1]
Organization: Kanga.Nu
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