Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
From: wright@duca.hi.com (David Wright)
Subject: Re: Looking for info on threads usage
Date: 2 Aug 1993 16:06:52 -0000	[thread overview]
Message-ID: <23js4sINNsjt@duca.hi.com> (raw)
In-Reply-To: CAzs3I.LFo@fig.citib.com

In article <CAzs3I.LFo@fig.citib.com> gjb@fig.citib.com (Greg Brail) writes:
>In article <23912uINNnu9@duca.hi.com> wright@duca.hi.com (David Wright) writes:
>>
>>I'm seeking informed opinion about the usage of DCE threads and other
>>pthreads implementations.  Specifically, I've ported DCE threads to
>>our OSF/1, using kernel threads.  This seems to work fine (after I
>>removed quite a few nasty bugs), but it does have the limitation that
>>we don't support priority setting or policy setting.  
>
>Not all DCE implementations support thread priorities, or even policy
>setting (assuming by that you mean policies for mutex locks and
>condition variables). I regard the thread priority stuff as
>non-portable.

Well, if I read the spec correctly, the priority and policy stuff is
not required of a pthreads implementation.  However, if you decide to
implement one of those features, there's a set of capabilities you
need to include.

Anyway, this answers one of my questions -- for the nonce, not
allowing priority or policy setting doesn't appear to be much of a
limitation.

>>Also, we can't
>>support applications that want to have a helper thread in the
>>background to intercept asynchronously-generated signals (e.g. quit).

>Does this mean you don't support sigwait()? The other DCE
>implementations I've use require the use of sigwait instead of other
>signal-handling interfaces. I usually do this by spawning a thread
>that calls sigwait and waits for a signal (hence the name :-) ). How
>does your threading system support signals? It's awfully useful to be
>able to catch them. I can see restricting usage of signals like SIGVTALRM
>and SIGIO like some DCE implementations do, but reliable DCE programs
>should be able to catch signals like SIGINT and SIGTERM to handle
>reliable shutdown.

We support sigwait(), but only for the original thread in a process.
That's because all asynchronously-generated signals are fed to that
thread.  Any child threads can only receive synchronously-generated
signals (e.g. SIGILL, SIGFPE).  This is how our Mach implementation
(OSF/1) does it.  I have ground my teeth about this more than once,
but for now we're stuck with it.

This is the reason we can't do signal_to_cancel_np; that call wants to
spawn off a child thread to act as a signal interceptor, which in our
setup it is incapable of doing.

So, in conclusion, do you (or anyone else -- don't be shy, speak right
up!) think this is a serious limitation?  I'd hate to go to user
threads now if I don't have to.

  -- David Wright, Hitachi Computer Products (America), Inc.  Waltham, MA
     wright@hicomb.hi.com  ::  These are my opinions, not necessarily 
     Hitachi's, though they are the opinions of all Right-Thinking People


       reply	other threads:[~1993-08-02 16:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <23912uINNnu9@duca.hi.com>
     [not found] ` <CAzs3I.LFo@fig.citib.com>
1993-08-02 16:06   ` David Wright [this message]
1993-08-03 16:10     ` Looking for info on threads usage Erik_Brown
1993-08-03 16:43     ` Greg Brail
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox