On Sun, Sep 30, 2001 at 09:48:21PM +1000, Ken Foskey wrote:
> Threads do not have to reload the total program vtable,  each copy of 
> the thread runs in the same address space and therefore it does not need 
> to switch address spaces,  it is entirely possible that different 
> programs will generate more page faults due to duplicated memory 
> structures that are not really required, for example those startup 
> parameters.

  The VM space of a forked process is the same as its parent's, merely
marked copy-on-write. The VM metadata is different, yes, but the data
referenced is the same - particularly to "duplicated memory structures 
etc." Reloading PTEs is small fry compared to reloading data.

  What you're describing here is far short of threading as people 
typically understand it. The process model under Linux already supports
sharing VM, signal handlers, file descriptors, etc, in any combination
you choose to name. 

  What people usually mean by threading is pthreads, which has lots of
semantics that Linux kernel threads do not implement. The reason that 
the kernel does not implement them is because, lo and behold, they
hurt performance. There's an ongoing process to provide the minimum 
required functionality in the kernel for a userspace pthreads library
to be able to provide a fully compliant pthreads interface (which may
well have completed since I last cared to look).

m.

-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to