Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Mar 1998 23:03:44 -0700
From:      Nate Williams <nate@mt.sri.com>
To:        Peter Wemm <peter@netplex.com.au>
Cc:        Nate Williams <nate@mt.sri.com>, John Birrell <jb@cimlogic.com.au>, cvs-committers@FreeBSD.ORG
Subject:   Re: cvs commit: src/lib/libc_r/uthread pthread_private.h uthread_yield.c 
Message-ID:  <199803080603.XAA06928@mt.sri.com>
In-Reply-To: <199803080555.NAA02577@spinner.netplex.com.au>
References:  <199803080536.WAA06540@mt.sri.com> <199803080555.NAA02577@spinner.netplex.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
> > > > If kernel threads aren't light-weight, then what differentiates them
> > > > from processes?
> > > 
> > > Shared address space.
> > 
> > You can do that easily enough know with mmap'd files, and or SYSV
> > shmem.
...

> libc_r/uthreads are implemented as a  user-land select loop.

I'm aware of that.

> It can't do
> blocking syscalls, and can't take advantage of multiple processors.

I'm also aware of that as well.

> That's what these changes are about.  In spite of the fact that they
> are seperate processes, having the shared address space means we can
> (greatly) streamline context switching between them.

So, they are more like slightly-lighter weight prorcesses?

> > It seems to me we're checking off a box on someone's list of features
> > w/out any regard to the usefulness of that feature. :(
> 
> I tend to think of threads being able to take advantage of multiple cpu's 
> as pretty useful.

We can do that with processes now.  As I stated originally, what
advantages do these 'heavy-threads' have over standard processes.  So
far the answer is context switches are faster due to shared address
space.  Other than that it appears that they are still pretty 'heavy'.

> Yes, we can probably go further and have lightweight threads (hundreds?
> thousands?) within a process, but that requires more extensive changes,
> especially with the implications of scheduling the same containing process
> multiple times on different cpu's.... *shudder*..

I understand.  I want the brass ring now, not later. :) :) :)

I as well as many others couldwrite applications *right now* that could
take advantage of truly lightweight kernel threads for socket
communication.  It would be nice to have hundreds if not thousands of
them running around that take up *significantly* less resources than
associated processes.  (resources include context switches, but also
include things like memory usage, etc....)



Nate





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



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