[mod.std.unix] limits; V4N8

std-unix@ut-sally.UUCP (Moderator, John Quarterman) (12/10/85)

From: seismo!gatech!hplabs!fortune!mats (Mats Wichmann)
Date: Monday,  9 Dec 1985 14:28-PST

The size of the environment certainly matters to fork/exec; the
reason is that all that data in user space has to be transferred
to kernel space somehow, then copied back out as part of the new
process. This is typically done through a series of fubyte()
calls, which vary in inefficiency with the type of MMU being
used in the machine. For someone running, say, a Motorola 68451
there is a horrible cost because the kernel has to do a lot
of calculation before knowing the virtual-to-physical translation
(Although by being clever and "caching" translations you can speed
it up quite a bit). Other MMUs make it easier - I think the VAX
scheme is a major improvement (although I am not intimately
familiar with it) and the Motorola 68851 is even better, and if
I am not mistaken, the National MMU chips even have an instruction
which basically moves data between user space and kernel space.

Whatever the exact numbers, transporting environments (and argument
lists, for that matter) across execs is a costly operation compared 
to most others.

    Mats Wichmann
    Fortune Systems
    {ihnp4,hplabs,dual}!fortune!mats

Volume-Number: Volume 4, Number 8