Communicator e3000 MPE/iX Release 7.5 (Software Release C.75.00) (30216-90336)

Chapter 5
Technical Articles
POSIX pthread (Draft 10) APIs
120
POSIX pthread (Draft 10) APIs
by Ranjani Narayan Commercial Systems Division
Introduction
For sometime now, customers of HP e3000 have been facing problems with the threads implementation on
MPE/iX. Though DCE did some workaround to get around these problems, this was insufficient for multiple
reasons. These were done only for DCE applications. Customers with JAVA and other applications using
POSIX implementation of threads would not be satisfied. These workarounds resulted in a lot of performance
problems, especially for high-end customers including DCE. A solution for these were to provide the necessary
POSIX pthread (Draft 10) APIs as part of FOS on MPE/iX. This article gives a technical overview of the
changes done to the various subsystems in order to provide a subset of POSIX pthread (Draft 10) APIs.
Current Limitations
Prior to this release, in order to write a multi-threaded application, it was mandatory to buy the DCE product
on MPE, since threads was packaged along with DCE product. DCE lab was responsible for all the fixes,
enhancements and maintenance of threads. This had the following disadvantages:
Mandatory to buy DCE product (to use threads feature)
Dependency on DCE lab for enhancements, fixes and maintenance
A logical part of O.S. (threads) was made a part of a product (DCE)
Solution Objectives
The main objectives of this solution is to provide threads as a part of FOS (make threads a logical part of the
O.S.) and provide all the necessary POSIX thread interfaces as per customer (JAVA) requirements. The other
objectives are to provide POSIX signals as per specification and to asynchronously cancel threads (when
desired).
Solution Overview
Make available Draft 10 threads APIs as per customer needs:
Prior to this release, thread APIs that were provided as part of DCE were Draft 4 compliant. With this
release, POSIX pthread APIs are provided as a part of FOS and are Draft 10 compliant (unless explicitly
stated). However, it is to be noted that the entire POSIX Draft 10 threads APIs are not provided as a part of
this solution. Only those APIs which were immediately needed by JAVA and DCE are provided.
Interaction of POSIX signals with thread APIs on MPE/iX:
Prior to this release, there have been problem reports from customers regarding the functioning of signals in
MPE, specifically with respect to threads. With this release, signals behave the way they should, as stated in
POSIX 1003.c standard.
Support cancellation points for threads to become cancel aware:
Until this release, Threads on MPE, were not asynchronously cancellable. With this release, threads can be
asynchronously cancelled, if desired, according to the POSIX 1003.c standard.
The following POSIX threads APIs are provided as a part of this solution: