Hallo,
On Mon, Jul 4, 2011 at 5:38 PM, Hendrik Boom hendrik@topoi.pooq.com wrote:
It might be possible to have gambit-generated C code live on top of part of the Modula 3 run-time system. Or learn how they do it all in detail and reimplement some of that stuff for Gambit. Or maybe have a gambit-modula3?
The GHC's runtime system seems to have a pretty nice support for multithreading. They are able to schedule N green threads over M OS threads, where the scheduler can move green threads between cores transparently. Of course they have it easier because Haskell disallow mutable state, so they don't have to worry about locks.
Erlang's VM avoids locks as well by using shared-nothing threads and message passing. Maybe a cool solution for Gambit-C would involve the assimilation of Termite and further work on distributing the lightweight processes among different cores. Incidentally, there may be some work already done in that direction, given that for supporting late binding on Windows modules don't access global variables anyway and are half-way thread-safe.
Well, so far just a bunch of ideas anyway.
[1] - http://www.haskell.org/~simonmar/multicore-haskell-marlow-qcon2010.pdf