Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Jul 2001 16:49:28 -0700 (PDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Julian Elischer <julian@elischer.org>
Cc:        Peter Wemm <peter@wemm.org>, Jason Evans <jasone@canonware.com>, current@FreeBSD.ORG
Subject:   Re: RFC: Kernel thread system nomenclature.
Message-ID:  <XFMail.010706164928.jhb@FreeBSD.org>
In-Reply-To: <Pine.BSF.4.21.0107061806540.33400-100000@InterJet.elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 07-Jul-01 Julian Elischer wrote:
> 
> 
> On Fri, 6 Jul 2001, John Baldwin wrote:
> 
>> > 
>> > my favourites are:
>> > proc, subproc, lwcpu, lwp
>> > 
>> > lwps are parcelled out to lwcpus to run when the appropriate subproc is
>> > scheduled.
>> 
>> One other note.  #2 is conceptually a related group of #4's, so I think it's
>> name should reflect that.  (It's view as a group of #4's is more important
>> than
>> as being a part of #1.)  So, if you go with lwp (yuck) for #4, #2 should be
>> lwpgrp or some such.  I still think lwp's overloaded nomenclature is a
>> reason
>> to stay away from it.  *shrug*
> 
> 
> As peter pointe out, NetBSD use lwp as a combination of #3 and #4
> (in fact they are mostly #4.. as they include a kernel stack I think)
> (hmm need to look at their definitions again)....
> 
> I think that an lwp can block. That makes it #4 definitly.
> unless we call the 'threads' ?

I like 'thread' for #4 personally, as I think it's what most people think of
when they think of an execution context.

> that would give:
>#1 proc
>#2 threadclass
>#3 ??? (thread carrier (spindle? :-))  or thread-processor
>#4 thread
> 
> the 'thread' is a path through code combined with a context.
> it proceeds along this path  when loaded into a thread-processor
> or an "execution-slot" or whatever we want to call #3.
> (i.e. it's scheduled).

Sounds good to me.  Just make #3 make sense. :)  I would vote for simple names
over more complex ones just to make it easier to understand. 
curproc/curthread/curwhatever and other process-related things get used all
over the kernel (except that it's fairly rare in drivers) so lots of people are
going to have to use this scheme in the future.  More so than if the internals
of the VM were renamed, for example.

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010706164928.jhb>