Subject: Re: "resident" executables, a COW and shared library like feature
To: None <>
From: Jaromir Dolecek <>
List: tech-kern
Date: 09/26/2002 09:00:32
As far as I know Unix supported this feature ~forever. And NetBSD UVM
share the text for executables for all processes running the program too,
of course.


Matthew Mondor wrote:
> Hi,
> Would anyone know if someone already implemented kernel-residentiable
> executables on unix, which may share the same text area in physical memory
> when many copies are being started?
> I know that there are COW pages, which permit to produce similar results
> when a process forks multiple times, and shared libraries which allow alot
> of code to be shared among processes using it;
> This however probably would look more in the form of a virtual fs
> or the like, where all executables started via execve(2) would actually
> share the same pages, it could also be static executables... basically it
> would be similar to if the process had already been launched once, but was
> sleeping in an invisible state, and a fork(2)-like operation would be
> performed on it when it then gets invoked...
> I mostly wonder if this already exists, or if some work was in progress
> to allow such a feature, which would probably be quite useful for some
> configurations, an example which comes to mind are external CGIs which an
> HTTP server would start many copies at once for instance. Although this
> last problem has various solutions in the web server area, this would
> consists of a generic solution for other similar issues, /bin/sh itself
> often has so many instances running is another example. The requirements
> of vm space would be reduced, while new process setup could also be
> faster.
> An operating system using a similar approach was AmigaOS 2.04+, although
> it required executables to be "pure", reentrant that is, and the rest
> seemed to be handled with special shell support. Of course the design
> was fairly different than what would have to be done on BSD
> Thanks,
> Matt

Jaromir Dolecek <>  
-=- We should be mindful of the potential goal, but as the tantric    -=-
-=- Buddhist masters say, ``You may notice during meditation that you -=-
-=- sometimes levitate or glow.   Do not let this distract you.''     -=-