[gambit-list] SMP works up to what point in GSC, any practical use possible currently?

Adam adam.mlmb at gmail.com
Mon Aug 21 08:11:14 EDT 2017


Hi Marc,

Aha - so - the garbage collector can run in parallell as of today.

Here are some more in depth questions (also hopefully more in line with
your terminology):


Can objects/heap be shared between (processors in different) VM:s?


How far has the work on multiple processors in one VM
(--enable-multiple-threaded-vms) gone? Specifically:

Can different processors which are running in one VM, share heap/objects
reliably?

Can multiple processors which are running in one VM execute [code] in
parallel reliably, presuming all but the root/first processor only utilizes
some given subset of the runtime (e.g. math and list processing is fine but
no IO as the IO not is multiprocessor-safe yet)?

Do routines to allocate/launch and stop/collect/deallocate (more)
processors in one VM exist & work reliably?

Do routines to send messages between multiple processors in one VM exist &
work reliably?

Do routines to facilitate work stealing between multiple processors in one
VM exist & work reliably?


I presume all the above is in the smp branch. Given some common sense
testing for a particular git commit, can the smp branch be counted as
reliable?

Also given common sense testing, can the main branch be counted as reliable?


When in the future do you think the runtime including IO will be proofed
for use across multiple processors in one VM?

Thanks and best regards,
Adam

2017-08-15 22:24 GMT+08:00 Marc Feeley <feeley at iro.umontreal.ca>:

> Not sure what you mean by “spawning more GVMs”…  Gambit’s model for
> concurrency within a single OS process is a single VM or multiple VMs, and
> within each VM there is a single “processor” or multiple “processors” (each
> processor is actually an OS thread).  These can be enabled with the
> --enable-multiple-vms and --enable-multiple-threaded-vms flags
> respectively.  Both of these flags are still experimental and work remains
> to be done (in the “smp” branch) to get it working smoothly.  However
> --enable-multiple-threaded-vms in the master branch will allow the garbage
> collector to run in parallel, with very good speedups on large heaps so
> that is useful right now even if Scheme threads are still green.
>
> Marc
>
>
>
> > On Aug 11, 2017, at 7:13 AM, Adam <adam.mlmb at gmail.com> wrote:
> >
> > Hi Marc,
> >
> > When starting GSC, spawning more GVM:s will work (= a part of SMP), the
> heap will work across more GVM:s (= another part of SMP), however the IO
> subsystem is not SMP:ified at all so as soon as you hit the REPL things
> will break bad.
> >
> > Is this a correct understanding, and, is there any practical use of the
> SMP currently?
> >
> > Like, some subset of the runtime that actually is SMP-proof (e.g. all
> except for IO) so you could use secondary GVM:s for computation in green
> threads and talk to them via some SMP-proof messaging primitives?
> >
> > Adam
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20170821/13a8b36c/attachment.htm>


More information about the Gambit-list mailing list