[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"splitting" in multiprocessors



    Sure.  Imagine a multiprocessing extension of SCHEME.  (Call it, just
    for laughs, MULTILISP.)  It might be crucial to efficiency to allow
    making copies of code for distribution to various processors.  I wonder
    what Halstead has to say about this.

Well, currently in Multilisp no "splitting" of procedures is discernible
-- but in part this is due to the fact that the current implementation
doesn't do any local copying of code of the sort you suggest.  It is
clear that such copying will be a useful strategy in the future, but I
have always felt that it would be best to think of it as a form of
caching that doesn't affect the naming or identity of objects.  In other
words, when a processor would look for a piece of code that it has a
pointer to, it would first consult a CAM or hash table or some such to
see if this is a piece of code of which there is a locally available
copy.  This is probably more efficient on a suitably designed processor
than on a plain-vanilla 68020 or 32032, but I guess that doesn't bother
me much.

The motivation for this is that, although it is easy enough to talk
about copying *code*, it is not so easy to make multiple copies of
*environments* or other potentially mutable objects.  Since generally
the path to a piece of code will be through an environment (and then a
closure) for which multiple copies are less likely (unless we have
either a low-level snoopy-cache type of protocol or some analysis that
proves particular environments to be immutable), I feel it is better for
environments to contain object references in a system-wide address
space.  Processors may then interpret these references differently
according to what selection of information they have cached locally,
rather than having a collection of distinct references to different
copies of objects.  If a given object has just one reference (or
"address"), no matter how many copies have been made of the object, then
it is easy for EQ? to operate as though no splitting has occurred.   -b.