Subject: Re: lightweight processes
To: None <tech-kern@NetBSD.ORG>
From: Neil A. Carson <>
List: tech-kern
Date: 02/12/1997 15:22:40

(Lightweight processes)
> Uh, I'd like to know who said that.

> There exists support in the kernel for kernel-only "processes"
> (e.g. the swapper and pagedaemon, and nfs I/O daemons).  However,
> this is not and never was a general-purpose facility, nor has there
> ever been any such general-purpose facility in 'vanilla' BSD kernels
> that i'm aware of.

> If somebody's claiming that there is such a general purpose facility
> in 4.4BSD, they are either incorrect, "optimistic," or you're
> misinterpreting what they're saying.  I say "optimistic" because some
> books, e.g. the "Design and Implementation of the 4.?BSD... System",
> tend to describe features or aspects of the system ... in rosy terms,
> where no such features exist or where they don't nearly live up to the
> description they're given.

As you seem to have guessed, this was in `The Design and Implementation of the 4.4BSD
Operating System' on page 80: It goes:

    The layout of the process state was completely reorganised in 4.4BSD. The goal
    was to support multiple {\em threads} that share an address space and other
    resources. Threads have also been called {\em lightweight processes} in other
    The reorganisation of the process state in 4.4BSD was designed to support threads
    that can select the set of resources to be shared, known as {\em variable
    lightweight processes [Ref]. Unlike some other implementations, the BSD model
    associates a process ID with each thread, rather than with a collection of threads
    sharing an address space.
    The process structure (with diagram) was shrunk to 1/4 of its former size [in
    4.4BSD]. The idea is to minimise the amount of storage that must be allocated to
    support a thread. The 4.4BSD distribution did not have kernel-thread support
    enabled, primarily because the C library had not been rewritten to be able to
    handle multiple threads.

Does the ``not enabled'' bit mean that it isn't in fact there? What else do you think
they are rabbiting on about?



* Neil A Carson (
* The Royal Military College of Science, Shrivenham.
* Address: Kitchener Mess, Royal Military College of Science, Shrivenham,
*          Swindon, Wilts SN8 8LA. Telephone: +44 (0)370 593183