DEC Threads to POSIX threads translation layer?

DEC Threads to POSIX threads translation layer?

Post by Dann Corbi » Tue, 04 Feb 1997 04:00:00



Is anyone aware of a POSIX threads emulator for ordinary DEC threads?  I
would like to be able to use a single source code base, and run all
threading calls through the POSIX threads API.  I also be able to run on
older DEC VAX systems that only have DEC threads.  Is anyone aware of an
available solution?

Alternatively, can POSIX threads be made to function on older installations
of VMS (before OpenVMS)?
--
I don't speak for anybody but myself, which everyone else is thankful for
( -- sig shamelessly purloined from Scott Johnson -- )

 
 
 

DEC Threads to POSIX threads translation layer?

Post by Eric Johns » Thu, 06 Feb 1997 04:00:00



>Is anyone aware of a POSIX threads emulator for ordinary DEC threads?  I
>would like to be able to use a single source code base, and run all
>threading calls through the POSIX threads API.  I also be able to run on
>older DEC VAX systems that only have DEC threads.  Is anyone aware of an
>available solution?

The DEC Threads package offers two APIs to the underlying user-level
thread package.  The CMA layer which is Digital specific, and the
POSIX layer.  Both layers offer similar functionality, just slightly
different arguments.  I know the CMA layer.  I've only read about the
POSIX layer, so your mileage may vary.

I don't know to which POSIX spec the threads package conforms to.  The
documentation is fairly complete so you should be able to find your
answers in the manual.

Quote:>Alternatively, can POSIX threads be made to function on older installations
>of VMS (before OpenVMS)?

VMS and OpenVMS are the same thing.  OpenVMS is simply the 90's style
name for the same robust operating system.  :->.  As to which version
of OpenVMS does one need for the DEC Threads package?  Beats me.
We've been using it since 6.x.

-Eric

 
 
 

DEC Threads to POSIX threads translation layer?

Post by Rich Sa » Thu, 06 Feb 1997 04:00:00



Quote:>Is anyone aware of a POSIX threads emulator for ordinary DEC threads?

The DCE 1.2.2 distribution includes an unsupported header file, library,
and README designed to put mostly Posix API's on top of DCE threads.
(The only source I contributed to this release of DCE. :)


        /r$

 
 
 

DEC Threads to POSIX threads translation layer?

Post by Dave Butenho » Thu, 06 Feb 1997 04:00:00



> Is anyone aware of a POSIX threads emulator for ordinary DEC threads?  I
> would like to be able to use a single source code base, and run all
> threading calls through the POSIX threads API.  I also be able to run on
> older DEC VAX systems that only have DEC threads.  Is anyone aware of an
> available solution?

First, a terminology correction. "DECthreads" (not "DEC threads") is the
generic name of Digital's common threading library. DECthreads is an
implementation of POSIX threads. Old versions of VMS (prior to 7.0) and
Digital UNIX (prior to 4.0), and all versions of ULTRIX and (currently)
NT provide only "draft 4" POSIX apis (also known as "DCE threads",
because it's the implementation that OSF licensed from us for DCE). New
versions of OpenVMS and Digital UNIX implement true POSIX threads, with
compatibility support for the draft 4 interfaces via a wrapper library.

OK, now, on to the real question. Whether your code is using the CMA
interface or the DCE thread interface, it would be fairly easy to write
your own set of POSIX wrappers on top of them. Like Sun's UI threads,
the semantics are very similar to POSIX threads. (It's a little more
complex with CMA threads, since you need to catch the exceptions and
convert back to POSIX error codes.)

Quote:> Alternatively, can POSIX threads be made to function on older installations
> of VMS (before OpenVMS)?

That, of course depends on what you mean, but the OpenVMS 7.0 version
of DECthreads (which supports POSIX threads) absolutely will not run on
earlier versions of VMS.


| 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 ]----------------/

 
 
 

1. P.Thread: setting RR scheduling policy on default thread?

Hello,

I'd like to use the round robin scheduling policy for my POSIX threads
based application...

I could set it successfully for threads I create explicitely, using
the thread attributes along with pthread_attr_setschedpolicy() prior
to pthread_create()

However the default thread desperately stays in throughput mode in
spite of all my attempts to turn it to RR;  Here's how I try to set
its scheduling policy before I create the other guys:

    int rs = 0;
    int policy = 0;
    pthread_t id = pthread_self();
    struct sched_param schedPrm;

    // Set the round robin scheduling policy on the main thread.
    rs = pthread_getschedparam( id, &policy, &schedPrm );
    if ( ! rs ) {
        policy = SCHED_RR;
        rs = pthread_setschedparam( id, policy, &schedPrm );
    }

This is using the standard PThreads calls (no draft 4), on OpenVMS
Alpha V7.2, V7.2-1, V7.2-2 and V7.3, all most recent O/S updates, RMS
and PThreads patches applied where applicable, and the Compaq C++
V6.5-004 compiler...

Side question: what are the implications of leaving that thread in
throughput mode, while the other threads are running on round robin?
Namely about shared RMS file synchronous access, with multistreams
(one stream per thread) open to a single file, and implicit RMS record
level locking trusted for mutual exclusion on concurrently accessed
records?  I am asking this as I get a deadlock once in a while, that
looks like happening on concurrent access to the first record of the
file, despite my triple checks for explicit sys$release() where
needed...

Thanks & Regards,

  -- OHM.

2. How to find cause of bouncing email?

3. POSIX threads and word tearing

4. Instaling soft how COMMON GROUP

5. Interlocked Queues and Posix Threads

6. XML-XS-XSLT-XPATH-XQL

7. Posix Threads

8. FS : Master Compacts

9. POSIX Threads and blocking system calls - is the behaviour defined?

10. sys$hiber and sys$wake with DECthreads/posix threads

11. DEC C++ v5.3, DEC threads (CMA) and exceptions

12. DEC C++'s iostream is not thread-safe?

13. DEC C thread tolerance