exec* exiting?

Alex Martelli aleax at aleax.it
Tue Aug 21 06:12:31 EDT 2001


"Andrew Dalke" <dalke at dalkescientific.com> wrote in message
news:9lsj6l$qeu$1 at nntp9.atl.mindspring.net...
    ...
> I've been worried about popen2.Popen3.__init__
    ...
> In this case, what's the fork/exec overhead?  Various
> pages are modified (eg, incref/decrefs to None, 0, 1, 2
> and various variables; a change to the stack, a getitem).
> Do OSes these days only modify-on-write parts of the
> process or does a modification to only a part require
> copying the whole things.

Modern Linux kernels use page-granularity (I'm not sure,
but I think a page is typically 4096 or 8192 bytes, depending
on your hardware).  I think I recall that was already the
case in 0.98, way back.

A good discussion of memory management in FreeBSD, with
some contrasting comments re how things are done in Linux,
is at http://www.daemonnews.org/200001/freebsd_vm.html.



> (Hard to grep through my paper copy of the Minux source,
> and that's probably out of date anyway:)

What's Minux, a Minix/Linux hybrid...?  Minix was
originally written for 8088 and such chips without
memory-management hardware support, so I doubt it
could afford COW anyway.  Linux was originally
written for 80386, with simple but workable hardware
support for paging VM, so COW and page granularity
were pretty much of a natural choice.


Alex






More information about the Python-list mailing list