From: Dave Butenhof <butenhof@zko.dec.com>
Subject: Re: Threads under Digital OSF 4.0d
Date: 1998/03/19 [thread overview]
Message-ID: <3510FDC4.F103A8DE@zko.dec.com> (raw)
In-Reply-To: 350ED209.9B44F5D2@brighttiger.com
Jeff Denham wrote:
> Rob Kirkbride wrote (in small part:
> > The problem is you don't seem to
> > be able to use realtime priorities any more from Ada as it assumes
> > process scope when creating the threads which is a little annoying to
> > have this changed on us. I realise in C you can change this option.
>
> Just a reminder -- in Digital UNIX 4.0-4.0C, all pthreads are
> process-scope threads. The only exception is for programs linked
> statically on pre-V4.0 versions of the OS. Only in V4.0D was
> system-contention scope (re)introduced. So, for a system scope (bound)
> thread, the priority/policy changes will again affect the thread's
> systemwide scheduling behavior. If you're not doing realtime, you should
> stick with
> process-scope threads (right, Dave?).
The only time you need SCS (system contention scope) is when you're creating
a thread that must compete, in realtime, for system-wide resources, against
threads operating in another process. That includes direct access to
hardware. (SCS may also benefit some "radically I/O bound" applications
currently, by factoring out the cost of frequent upcalls -- but that's only
because we're "not quite perfect yet"; the cost has been substantially
reduced in each release since 4.0, and will continue to shrink.)
It's important to have SCS capability -- but only rare applications NEED it.
There are many "realtime" applications which are "soft" realtime, and whose
threads need to compete only among themselves for process resources. PCS
(process contention scope) is suitable for these realtime applications, and
far more efficient in most cases. If you don't have critical, realtime
invariants that are shared across processes, (including with the kernel
"process", or hardware), then you don't need SCS.
Since Ada is oriented towards realtime programming, an implementation of Ada
that uses POSIX threads might consider supporting a pragma/attribute to
cause specific tasks to be created using SCS threads. It might even create
all threads using SCS, but that limits scaleability, and is less friendly to
the system as a whole. (Unless you're writing an embedded system, that
should be a concern!)
/---------------------------[ Dave Butenhof ]--------------------------\
| Digital Equipment Corporation butenhof@zko.dec.com |
| 110 Spit Brook Rd ZKO2-3/Q18 http://members.aol.com/drbutenhof |
| Nashua NH 03062-2698 http://www.awl.com/cseng/titles/0-201-63392-2/ |
\-----------------[ Better Living Through Concurrency ]----------------/
prev parent reply other threads:[~1998-03-19 5:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-03-10 5:00 Threads under Digital OSF 4.0d Rob Kirkbride
1998-03-12 5:00 ` Dale Stanbrough
1998-03-12 5:00 ` Dave Butenhof
1998-03-12 5:00 ` Rob Kirkbride
1998-03-17 5:00 ` Stephen Leake
1998-03-17 5:00 ` Jeff Denham
1998-03-19 5:00 ` Dave Butenhof [this message]
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