* DU 4.0 threads
@ 1996-08-08 4:00 Steve Peltz
1996-08-09 4:00 ` Dave Butenhof
0 siblings, 1 reply; 2+ messages in thread
From: Steve Peltz @ 1996-08-08 4:00 UTC (permalink / raw)
Guide to DECthreads for 4.0 says, with regard to thread scheduling, that
"prior to Digital Unix Version 4.0, all threads were System Contention Scope.
In Digital UNIX Version 4.0, all threads created using DECthreads are in
Process Contention Scope. In the future, the pthread_attr_setscope function
will allow the programmer to select the desired contention scopre for each
thread created".
Does this apply to any threaded programming running on DU4.0, or only programs
that have been compiled under 4.0, or only programs that have been compiled
under 4.0 with -pthreads instead of -threads?
How long do we have to wait until the pthread_attr_setscope function is
available. Is there any way now to force system contention scope? Does
this mean I should retreat back to 3.2, since I really need it to be done
the other way?
Is there a list of all changes from the Draft POSIX standard that -threads
gets and the version that -pthreads gets, or is the only way to compile it
using -pthreads and start tracking down all the errors? I've already got
a small list of my own, but of course I've really only found those things
that change the syntax (such as types of variables, using NULL instead of
the various default attribute types, etc). If there are other behavioral
changes, such as the priority scheduling, or that sigaction is now global
rather than thread-specific, I'm not likely to notice it until it starts
causing problems.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: DU 4.0 threads
1996-08-08 4:00 DU 4.0 threads Steve Peltz
@ 1996-08-09 4:00 ` Dave Butenhof
0 siblings, 0 replies; 2+ messages in thread
From: Dave Butenhof @ 1996-08-09 4:00 UTC (permalink / raw)
Steve Peltz wrote:
>
> Guide to DECthreads for 4.0 says, with regard to thread scheduling, that
> "prior to Digital Unix Version 4.0, all threads were System Contention Scope.
> In Digital UNIX Version 4.0, all threads created using DECthreads are in
> Process Contention Scope. In the future, the pthread_attr_setscope function
> will allow the programmer to select the desired contention scopre for each
> thread created".
>
> Does this apply to any threaded programming running on DU4.0, or only programs
> that have been compiled under 4.0, or only programs that have been compiled
> under 4.0 with -pthreads instead of -threads?
It applies to anything except a static binary built on earlier versions.
Mixed mode scheduling gains substantial improvement in performance and
in scalability (minimizing use of kernel resources for most threaded
code). System contention scope isn't required by the standard, and very
few programs need it, so we didn't do it. It's "in progress" now, and
we'll be releasing it in a functional update... but of course I can't
say when at this time.
> How long do we have to wait until the pthread_attr_setscope function is
> available. Is there any way now to force system contention scope? Does
> this mean I should retreat back to 3.2, since I really need it to be done
> the other way?
You can certainly continue to use 3.2 until the appropriate 4.x update
appears, if you can't live without system contention scope. I'm sorry
we couldn't get everything into 4.0, but we had to make tradeoffs, and
unfortunately that means that now you do, too.
> Is there a list of all changes from the Draft POSIX standard that -threads
> gets and the version that -pthreads gets, or is the only way to compile it
> using -pthreads and start tracking down all the errors? I've already got
> a small list of my own, but of course I've really only found those things
> that change the syntax (such as types of variables, using NULL instead of
> the various default attribute types, etc). If there are other behavioral
> changes, such as the priority scheduling, or that sigaction is now global
> rather than thread-specific, I'm not likely to notice it until it starts
> causing problems.
The Guide to DECthreads that's included with Digital UNIX 4.0 has a
section describing the changes from 1003.4a/D4 (DCE threads) to POSIX
threads (1003.1c-1995). It's Appendix G. It doesn't give every detail,
unfortunately, because, really, every function has changed in at least
one significant way. It's a port, and there's no practical way to
automate it, although a few parts are as simple as a global replace.
You need to look at each DCE threads call and convert it into a POSIX
thread call.
Appendix A gives additional information specific to Digital UNIX, including
contrasts with the behavior of 3.0 and 3.2X... you've clearly seen this
section, since you quoted some of it.
/---[ Dave Butenhof ]-----------------------[ butenhof@zko.dec.com ]---\
| Digital Equipment Corporation 110 Spit Brook Rd ZKO2-3/Q18 |
| 603.881.2218, FAX 603.881.0120 Nashua NH 03062-2698 |
\-----------------[ Better Living Through Concurrency ]----------------/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1996-08-09 4:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-08-08 4:00 DU 4.0 threads Steve Peltz
1996-08-09 4:00 ` Dave Butenhof
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox