* Threads under Digital OSF 4.0d
@ 1998-03-10 5:00 Rob Kirkbride
1998-03-12 5:00 ` Dale Stanbrough
1998-03-12 5:00 ` Dave Butenhof
0 siblings, 2 replies; 7+ messages in thread
From: Rob Kirkbride @ 1998-03-10 5:00 UTC (permalink / raw)
We have recently upgraded the operating system from 3.2g to 4.0d and are
experiencing what I can only describe as 'funnies'. This was done as
3.2g was not fully Y2K complient.
The software written in Ada creates nearly 500 threads and it ran pretty
reliably on 3.2g. On 4.0d things don't seem to be happening quite as
expected (and as they did). Structures seem to be getting corrupted
every now and again. I haven't proven it isn't our software yet but I'm
getting close.
ps does not now show all the threads (about 50 when we create nearly
500). I also don't think it's using our priorities any more. We've
registered this with DEC but they haven't got back to us yet.
Has anyone else had any experience with it, good or otherwise running C
or Ada with pthreads?
Thanks in advance for any insight.
Rob
--
Rob Kirkbride (rob@rk-comp.demon.co.uk)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Threads under Digital OSF 4.0d
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
1 sibling, 0 replies; 7+ messages in thread
From: Dale Stanbrough @ 1998-03-12 5:00 UTC (permalink / raw)
Rob Kirkbride writes:
>ps does not now show all the threads (about 50 when we create nearly
>500). I also don't think it's using our priorities any more. We've
>registered this with DEC but they haven't got back to us yet.
I would doubt that DEC Posix threads would work on a 1:1 thread:process
basis (but of course i may be wrong). Solaris implements a 2 level model,
where multiple threads are placed into multiple processes (given an
appropriate thread allocation policy), and I would guess that Dec would
not be that different.
Go to comp.programming.threads for more information than you could want
on this issue.
Dale
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Threads under Digital OSF 4.0d
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
1 sibling, 1 reply; 7+ messages in thread
From: Dave Butenhof @ 1998-03-12 5:00 UTC (permalink / raw)
Rob Kirkbride wrote:
> We have recently upgraded the operating system from 3.2g to 4.0d and are
> experiencing what I can only describe as 'funnies'. This was done as
> 3.2g was not fully Y2K complient.
>
> The software written in Ada creates nearly 500 threads and it ran pretty
> reliably on 3.2g. On 4.0d things don't seem to be happening quite as
> expected (and as they did). Structures seem to be getting corrupted
> every now and again. I haven't proven it isn't our software yet but I'm
> getting close.
The corruption is most likely an application or ada bug, rather than a bug
in the thread library. It's impossible to even offer an informed guess on
the basis of your information, but, historically, this is true of nearly
all data corruptors.
> ps does not now show all the threads (about 50 when we create nearly
> 500). I also don't think it's using our priorities any more. We've
> registered this with DEC but they haven't got back to us yet.
Yes, ps does show "all the threads", by its definition. It's just that ps
only knows about kernel threads, and that's different from application
threads. And ps won't know about your application thread priorities because
they (by default) have nothing to do with the kernel. I suggest you read
the release notes, and especially appendix A (especially A.3) of the 4.0D
Guide to DECthreads, for more information.
ps is not an application debugging tool -- it's a system display tool. When
you want to get into your application and see what's happening, use
ladebug, or another thread-aware debugger such as TotalView.
> Has anyone else had any experience with it, good or otherwise running C
> or Ada with pthreads?
Yes. Lots of them. Most are good. That, of course, does not mean there
aren't any problems; but to have any hope of identifying (much less
correcting) any problems there might be, we need quite a bit more
information than this!
/---------------------------[ 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 ]----------------/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Threads under Digital OSF 4.0d
1998-03-12 5:00 ` Dave Butenhof
@ 1998-03-12 5:00 ` Rob Kirkbride
1998-03-17 5:00 ` Stephen Leake
0 siblings, 1 reply; 7+ messages in thread
From: Rob Kirkbride @ 1998-03-12 5:00 UTC (permalink / raw)
In article <3507FA3C.6A92645D@zko.dec.com>, Dave Butenhof
<butenhof@zko.dec.com> writes
>Rob Kirkbride wrote:
>
>> We have recently upgraded the operating system from 3.2g to 4.0d and are
>> experiencing what I can only describe as 'funnies'. This was done as
>> 3.2g was not fully Y2K complient.
>>
>> The software written in Ada creates nearly 500 threads and it ran pretty
>> reliably on 3.2g. On 4.0d things don't seem to be happening quite as
>> expected (and as they did). Structures seem to be getting corrupted
>> every now and again. I haven't proven it isn't our software yet but I'm
>> getting close.
>
>The corruption is most likely an application or ada bug, rather than a bug
>in the thread library. It's impossible to even offer an informed guess on
>the basis of your information, but, historically, this is true of nearly
>all data corruptors.
I've virtually proved its due to the 'new' context switching within the
threads library rather than the kernel.
>
>> ps does not now show all the threads (about 50 when we create nearly
>> 500). I also don't think it's using our priorities any more. We've
>> registered this with DEC but they haven't got back to us yet.
>
>Yes, ps does show "all the threads", by its definition. It's just that ps
>only knows about kernel threads, and that's different from application
>threads. And ps won't know about your application thread priorities because
>they (by default) have nothing to do with the kernel. I suggest you read
>the release notes, and especially appendix A (especially A.3) of the 4.0D
>Guide to DECthreads, for more information.
Yeah we've just worked that out today. 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.
>
>ps is not an application debugging tool -- it's a system display tool. When
>you want to get into your application and see what's happening, use
>ladebug, or another thread-aware debugger such as TotalView.
decladebug seems to have got more buggy with 4.0d
>
>> Has anyone else had any experience with it, good or otherwise running C
>> or Ada with pthreads?
>
>Yes. Lots of them. Most are good. That, of course, does not mean there
>aren't any problems; but to have any hope of identifying (much less
>correcting) any problems there might be, we need quite a bit more
>information than this!
We have submitted more information on a proper call but I am interested
to see if other people are suffering from the same problem, which
judging by my email response - they are!
--
Rob Kirkbride
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Threads under Digital OSF 4.0d
1998-03-12 5:00 ` Rob Kirkbride
@ 1998-03-17 5:00 ` Stephen Leake
1998-03-17 5:00 ` Jeff Denham
0 siblings, 1 reply; 7+ messages in thread
From: Stephen Leake @ 1998-03-17 5:00 UTC (permalink / raw)
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.
If you can change it in C, you can change it in Ada; just import the
routine and call it! If you have to call it before the Ada environment
task is created, then you'll have to write a main wrapper in C that
calls the Ada elaboration and finalization code. Either way, it should
be doable.
--
- Stephe
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Threads under Digital OSF 4.0d
1998-03-17 5:00 ` Stephen Leake
@ 1998-03-17 5:00 ` Jeff Denham
1998-03-19 5:00 ` Dave Butenhof
0 siblings, 1 reply; 7+ messages in thread
From: Jeff Denham @ 1998-03-17 5:00 UTC (permalink / raw)
Stephen Leake 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.
>
> If you can change it in C, you can change it in Ada; just import the
> routine and call it! If you have to call it before the Ada environment
> task is created, then you'll have to write a main wrapper in C that
> calls the Ada elaboration and finalization code. Either way, it should
> be doable.
>
> --
> - Stephe
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?).
Jeff
__________________________________________________
Jeff Denham (jdenham@brighttiger.com)
Bright Tiger Technologies
SmartCluster� Software for Distributed Web Servers
http://www.brighttiger.com
125 Nagog Park
Acton, MA 01720
Phone: (978) 263-5455 x177
Fax: (978) 263-5547
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Threads under Digital OSF 4.0d
1998-03-17 5:00 ` Jeff Denham
@ 1998-03-19 5:00 ` Dave Butenhof
0 siblings, 0 replies; 7+ messages in thread
From: Dave Butenhof @ 1998-03-19 5:00 UTC (permalink / raw)
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 ]----------------/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~1998-03-19 5:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox