Re: SCO: "thread creation is about a thousand times faster than on

From: Alexander Viro (viro@math.psu.edu)
Date: Thu Aug 31 2000 - 09:33:19 EST


On Tue, 29 Aug 2000, Albert D. Cahalan wrote:

> Proposal 'c' is that way. If you agree that "VM is just one of
> the resources" but think that there are "uses for sharing between
> different programs", proposal 'a' is for you.

Sorry, no. VM is the resource that execve() replaces. That is what
execve() is all about - build a new VM by binary and replace the VM
component of process with it.

execve() doesn't modify VM - it builds a new one from scratch. IOW, it's
not "load a program into existing address space". It's "build a new
address space by the program and attach it to virtual machine (aka.
process)".

Yes, if you are the sole owner of your VM you can cannibalize mm_struct
to avoid the overhead of kmem_cache_alloc(). But that should be (and is) a
transparent optimisation.

Think of it that way: we have virtual machines built from several
components. Thread of execution is one of the components (CPU), VM is
another (memory), descriptor table is IO space, etc. execve() is "build a
new VM and throw the old away". fork() is "build copies of everything and
make a new virtual machine out of them". clone() is "build copies of CPU
and some other parts and make a new virtual machine out of them, sharing
the remaining parts with the old one". exit() is "throw the virtual
machine away".

Heh. USENIX paper title: "Ghostwheel: Use of Reflections in Implementation
of rfork()-style Threads"...

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 31 2000 - 21:00:27 EST