jack@dcs.glasgow.ac.uk (Jack Campin) writes:
> Date: 26 Nov 92 15:08:26 GMT
> Organization: COMANDOS Project, Glesga Yoonie
> ...
> ....Is there a Pop with full-strength orthogonal
> persistence? Is anybody working on one? Is there anything about Pop that
> makes it impossible?
I don't know precisely what you mean by "orthogonal persistence",
but I'll guess that you mean being able to suspend a program and
then restart it on another machine or in another version of the
operating system or a later version of the Pop compiler system.
There are saved images in Poplog Pop-11, including layered saved
images (you can create a saved image relative to another saved
image) and shareable saved images (i.e. containing non-writeable
code and data that can be shared, in the same portion of memory,
between different users.)
But orthogonal persistence in the sense defined above is probably
very difficult, or impossible, at least for versions like Poplog
Pop-11 for the following reasons:
(a) Procedures are first class objects that can occur wherever any
other data-type represented by a pointer can occur, and procedures
are fully compiled. Thus user procedures are records in the heap
containing machine instructions. This means that saving the heap
will produce something that cannot be expected to work on another
machine. If the implementation used only some intermediate code and
interpreted it, this objection might go away, though the cost would
be a loss in speed of execution. Alternatively a VERY clever system
could somehow translate the compiled procedures into a machine
independent notation, or could keep some intermediate representation
of the compiled procedures created during compilation, and use that
in the persistent version. The cost would be time required for doing
the translation and possibly the extra space for storing both
versions of each procedure.
(b) System procedures are no different from user procedures and they
too are objects that can be stored in user datastructures on the
heap. So datastructures in the heap can contain pointers into system
procedure records containing machine instructions. Apart from the
problem mentioned in (a) this raises the further problem that
different versions of Poplog Pop-11 may have the same system
procedures located at different places in (virtual) memory. Thus a
saved image created using one version, if restored relative to a
newer version of Poplog, even on the same machine, may contain
pointers to the wrong locations in the system. This could be
overcome either by replacing all such references with symbols
indicating what they point to before a saved image is made and then
replacing the symbols when the system starts up. I can think of
other possibilities, all with efficiency costs.
(c) Other problems arise out of the access that Poplog Pop-11 gives
you to system facilities, e.g. pipes in Unix and mailboxes in VMS,
that are not available in all operating systems. E.g. it takes
advantage of MMAP for shareable saved images on some Unix systems,
but does something different when that's not available.
I don't think any of this means that full persistence is totally
impossible. The tradeoffs may not make it worth while though.
There are various partial solutions in the form of libraries that
allow datastructures to be saved on disk in a file and then restored
later. The files use a format that's independent of machine or
operating system or version of Pop-11. But the data-structures then
can't include procedures, although they can contain source code
instructions for creating procedures. They could also include lists,
strings, words, arrays, records, vectors, properties, numbers, etc.
LIB DATAFILE, originally implemented by David Hogg (now a professor
at Leeds) provides such a mechanism. I believe Jonathan Meyer, at
Integral solutions ltd has produced a more general version.
Apologies if my answer is irrelevant because I misunderstood the
question.
Aaron
---
--
Aaron Sloman, School of Computer Science,
The University of Birmingham, B15 2TT, England
EMAIL A.Sloman@cs.bham.ac.uk OR A.Sloman@bham.ac.uk
Phone: +44-(0)21-414-3711 Fax: +44-(0)21-414-4281
|