executing a stream / a compressed file

Roy Smith roy at phri.nyu.edu
Sat Feb 16 02:04:13 AEST 1991


torek at elf.ee.lbl.gov (Chris Torek) writes:
> the kernel could run compressed binaries by uncompressing them into a
> swap image, and running the swap image (this would be easier in pure
> swapping systems) or by uncompressing them into ordinary unlinked files
> and running those.  The implementation of the latter is trivial even in
> user code.

	Gaak!  Compression does not belong in the kernel (he says with
great authority and religious overtones), unless maybe you're talking about
a driver for a DES chip.

	All you really need to implement compressed executables (as Chris
hinted) is to start the executable files with "#!/bin/uncompressexec" which
would uncompress the rest of the file, put it back in place of itself (if
you want to cache uncompressed executables, which is probably a good idea)
and then overlay itself with the new executable.  A nightly cron job could
recompress stuff that hasn't been run in a while.
--
Roy Smith, Public Health Research Institute
455 First Avenue, New York, NY 10016
roy at alanine.phri.nyu.edu -OR- {att,cmcl2,rutgers,hombre}!phri!roy
"Arcane?  Did you say arcane?  It wouldn't be Unix if it wasn't arcane!"



More information about the Comp.unix.internals mailing list