What's a POS??

Harvey J. Stein abel@netvision.net.il
Sat, 10 May 1997 21:17:24 +0300


Martin Cracauer writes:
 > The Lisp equivalent could look something like this
 > 
 >   (somecommand (file-information (glob "foo*.dat")))
 > 
 > where file-information puts out a struct that somecommand uses to do
 > its work.
 > 
 > No, if `ls -l` were a long-running program, or if I would like to
 > capture the state of the directory before I change somethings, I could
 > do it like this
 > 
 >   ls -lg foo*.dat > somefile
 > 
 > and later, maybe weeks and reboot later
 > 
 >   somecommand < somefile
 > 
 > What would the Lisp POS equivalent look like? How would it be
 > different from plain print/reading the struct?

I'd presume the POS equivalent would be:

   (setq somefile (file-info (glob "foo*.dat")))

Later you could do

   (somecommand somefile)


When you wanted to do:

   rm somefile

You'd instead do

   (unintern somefile)

The system itself would make sure that everything's committed to disk
at an appropriate time.

This actually seems to be pretty close to a swap space that survives
reboot.  Maybe one could hack the Linux kernel to provide a swap space
that's dedicated to a process.  One would also want an additional hook
to swap out *everything* when shutdown is signaled.  Then, when
restarting, one could restart the process from the swap space.

However, maybe I'm mistaken, since this doesn't seem to be
functionally different from the dumplisp answer, and the latter
requires less work (since it's already been done), but the swap space
solution would presumably give better performance because the OS would
take care of putting old pages into swap space, so the equivalent
(dumplisp) call wouldn't have to write the entire universe to disk,
just the rest of the universe.

Of course, both solutions have problems with file pointers, X & TCP
connections, ...

-- 
Harvey J. Stein
Berger Financial Research
abel@netvision.net.il