Scope system threads (was Re: PS_BLOCKED)

Daniel Eischen eischen at pcnet1.pcnet.com
Tue Apr 8 21:26:47 PDT 2003


On Tue, 8 Apr 2003, David Xu wrote:

> Daniel,
> 
> These are optimizations, right?

For the most part, yes.  But I thought I'd enumerate what I'd
like to see.

> Could we stablize the libpthread before optimizing it?
> Is per-kse problem resolved? I don't stick to this, 

I'm working on it now.  It seems to be working, but I've got to go
through the rest of the files to make sure we don't assume that
thread->kse is consistent.

> and if you think it should be resolved now, I would like to
> work on it.

There are two things that I know of that need fixing/looking at.
One is signals which we've already talked about.  The other is
getting the remaining ACE tests to pass.  There seems to be
3 or 4 that fail and I can't seem to follow the C++ code well
enough to figure out where.  Have you ever built ACE?  I've
got an older version that I'm using (version 5.2 I think).
My patches to get it to compile are at:

  http://people.freebsd.org/~deischen/ace5.2_patches

If a call to sigqueue() in the source code causes a compile failure,
just change it to kill().  Read the top-level ACE_INSTALL file;
you have to add a couple of links before compiling.  Also, it
wouldn't build from the top-level; I just cd'd into
ACE_Wrappers/ace and did a gmake there, and then into
ACE_Wrappers/tests and also gmake.

If you could debug those that would help a lot.

I'll get another patch set up as soon as I can.  I'd like to
commit as soon as we get signals and the ACE bugs figured out.
Then we can work on getting multiple KSEs and KSEGs going.
The code is mostly there; probably needs to be reworked a bit
(along with more debugging).

-- 
Dan Eischen

> 
> David Xu
> 
> ----- Original Message ----- 
> From: "Daniel Eischen" <eischen at pcnet1.pcnet.com>
> To: "Julian Elischer" <julian at elischer.org>
> Cc: "David Xu" <davidxu at freebsd.org>; <freebsd-threads at freebsd.org>
> Sent: Tuesday, April 08, 2003 2:07 AM
> Subject: Scope system threads (was Re: PS_BLOCKED)
> 
> 
> > Rethinking scope system threads a bit...
> > 
> > Here's what I'd like for scope system threads:
> > 
> >   o No separate upcall stack; only ever gets one upcall
> >     after kse_create() is called.
> >   o Still has a thread mailbox in which the lone thread's
> >     signal mask is placed.
> >   o The UTS can deliver signals to scope system threads
> >     with kse_thr_interrupt(&scope_system_thread->tmbx, sig)
> >     or equivalent.  Since there is no upcall stack, you
> >     can't make an upcall with kse_mbox->km_sigscaught; you
> >     need to send it a signal just like it was a regular
> >     non-KSE thread.
> >   o Can wait for KSE events from other KSE/KSEGs with
> >     kse_release(&ts).  After receiving a wakeup or timing
> >     out, kse_release just returns normally -- no upcall.
> >     Typically, we need to wait for low-level locks or
> >     pthread_cond_[timed]wait().
> > 
> > -- 
> > Dan Eischen
> 



More information about the freebsd-threads mailing list