Subject: Re: execing gzipped files (was Re: Netpliance Iopener booted with
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Greywolf <greywolf@starwolf.com>
List: current-users
Date: 03/23/2000 13:19:46
On Thu, 23 Mar 2000, der Mouse wrote:

# >>>    % gzip -9 hello
# >>>    % ./hello.gz
# >>>    Hello world
# 
# > [W]hile there's no reason that *all* architectures shouldn't benefit
# > from this neat hack, it does require putting gzip in the kernel.
# 
# That was my first thought too.
# 
# Now I'm not so sure.  Couldn't ld.so or ld.elf_so or whatever it's
# called these days handle forking gunzip?  Or Am I Missing Something
# (tm)?

:-)

The problem lies in that most of the executables compiled for the miniroot
are *static*.

And even if ld.so or whatever did that, that's still kind of a lose:
What if gunzip is gzipped? :-)

I think the guts of gunzip need to be built into the exec module, callable
from the exec module or built in to ld.so*.

# > it probably kills demand paging though.  :)
# 
# I daresay. :)  And machines so cramped for disk space that they have to
# resort to this trick are likely to be the ones shortest on swap. :(

The demand-paging algorithm would have to be modified a fair bit if
it's hitting gzipped executables; it'd probably have to do compressed-
to-normal page/offset mappings on the first hit on the executable, freeing
that table once the executable's last reference is closed.

It'd kill demand paging-over-NFS, though, given its stateless nature...

# 
# 					der Mouse
# 
# 			       mouse@rodents.montreal.qc.ca
# 		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
# 


				--*greywolf;
--
BSD: unshackling hardware designers and users from the bondage of WinTel.