Harvey J. Stein abel@netvision.net.il
Sun, 11 May 1997 12:50:55 +0300

Kelly Murray writes:
 > Brian Spilsbury presumably writes:
 > > My proposal is to simply have all of memory as cache for disk,
 > > looking at memory in chunks as mapping to disk as chunks.
 > All you've described is virtual memory.
 > This works fine if there isn't any sharing of that memory 
 > with other machines/address spaces.  That is the hard part.
 > You've also limited your total system data
 > to the size of your address space, which is 4gb at best.
 > Any you also must make sure GC doesn't need to
 > scan over the whole disk-resident world.

Well, virtual memory with an aggressive swapping algorithm - one which
tries to get everything onto disk, as opposed to the more common
algorithm of only moving things to disk as one runs out of ram.

Also, one which probably includes some OS hooks so that a) a swap
space is dedicated to a process so that b) the process can be
restarted after reboot from the swap space.

And, I guess one needs to do some sort of journalling style of swap
space so that even though it'll be out of date if the lisp process is
really chugging along, it'll still be self consistent.

And, the restart might be a little tricky because of TCP/IP
connections, X connections, File pointers (even with transparent
persistence, I'd think that file pointers in some sense or other will
still be needed, for example, maybe into NFS filesystems mounted on
other machines which we need to access), and all other situations
where an object has an associated state which partially resides
outside the system.

And, as Paul Prescond keeps pointing out, unless you formalize the
semantics of persistence so that the user can clean his workspace, you
can easily run into applications squirreling away huge amounts of
memory which is difficult for the user to track down and free.

And, something which I don't recall being mentioned yet, there are
costs associated with keeping an object in a workspace as opposed to
explicitly writing it to disk and reading it back later.  Namely,
the garbage collector is going to have to keep looking at it, and
possibly have to move it around, and it could be taking up valuable
address space.  The gc cost I guess can be reduced through
generational gc, but I don't believe it can be eliminated.

Harvey J. Stein
Berger Financial Research