Re: Virtual Worlds, the Common Language Runtime and Concurrency

Eliot Miranda <eliotm@pacbell.net>
11 Feb 2005 22:22:22 -0500

          From comp.compilers

Related articles
Virtual Worlds, the Common Language Runtime and Concurrency jimpurbrick@yahoo.co.uk (Jim Purbrick) (2005-02-06)
Re: Virtual Worlds, the Common Language Runtime and Concurrency eliotm@pacbell.net (Eliot Miranda) (2005-02-11)
| List of all articles for this month |

From: Eliot Miranda <eliotm@pacbell.net>
Newsgroups: comp.compilers
Date: 11 Feb 2005 22:22:22 -0500
Organization: Compilers Central
References: 05-02-038
Keywords: OOP, parallel

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


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.