|Virtual Worlds, the Common Language Runtime and Concurrency firstname.lastname@example.org (Jim Purbrick) (2005-02-06)|
|Re: Virtual Worlds, the Common Language Runtime and Concurrency email@example.com (Eliot Miranda) (2005-02-11)|
|From:||Eliot Miranda <firstname.lastname@example.org>|
|Date:||11 Feb 2005 22:22:22 -0500|
Jim Purbrick wrote:
> I'm currently looking in to using Mono to support user scripting of a
> virtual world. ...
> The question is, how to approach concurrency when the scripts aren't
> interpreted, but JIT compiled? Using 1 thread per script is out of the
> question, and even using the .NET thread pool will only allow as many
> scripts to run concurrently as there are threads in the pool.
If you target a JIT implementation of Smalltalk with green threads
(e.g. VisualWorks, www.cincomsmalltalk.com) you'll easily be able to
afford 1 thread per script and can implement a selective time-slicer
to schedule the pool of script threads (and implement this in
Smalltalk - the scheduler is sufficiently open from the Smalltalk
level to allow this).
Thread switch times are in the low microseconds on inexpensive
hardware (e.g. PII, PIII) with memory overhead per thread in the
hundreds of bytes range (e.g. a Process plus an initial set of three
stack frames has an overhead of around 350 bytes).
Eliot Miranda Smalltalk - Scene not herd
Return to the
Search the comp.compilers archives again.