Vats, Islands, and Collections: Finding cheap parallelism
tapplek at gmail.com
Thu Jan 24 06:34:59 UTC 2008
I'm going to be working on making squeak multi-core as part of
my grad work. I have a bit of work to do before I get to the
stage where I actually have to implement a parallel code model,
but I am thinking about it in the abstract as a mental exercise
for now. I will most likely use the vats/islands system used by
SqueakELib and Croquet, as it has been validated.
But I have a pressing concern: How could this be used to do what
seems (to me and my mentors) to be the cheapest, simplest, most
obvious parallelism extraction ever: get Collection>>do:,
collect:, etc. to run one element per native thread (= vat =
However, I may be overlooking copying costs (code, objects, or
both) that make this more a naive parallelization than I expect.
Assuming the elements are read-only for the duration of the
enumeration (the common case), they can be safely copied
willy-nilly to whatever vat they need to be in to run (or use
shared memory if it is available and fast).
Can this be done using vats? Does copying kill it? I get asked
about this problem every time I talk about vats. Everyone seems
to think this (loop-level parallelism) is the simplest, most
fool-proof way to make things faster on a multi-core system, and
give me funny looks when I don't have a quick answer on how this
works in the vats model.
Matthew Fulmer -- http://mtfulmer.wordpress.com/
Help improve Squeak Documentation: http://wiki.squeak.org/squeak/808
More information about the Squeak-dev