Tru64 UNIX

Guide to the POSIX Threads Library

Order Number: AA-RH9RC-TE

This document serves as a comprehensive guide to the Tru64 UNIX and OpenVMS (Version 5.0A or higher) POSIX Threads Library and the HP Multithreading Run-Time Library, primarily aimed at system and application programmers.

The guide covers the principles of multithreaded programming, its advantages (e.g., performance, responsiveness, multiprocessor utilization) and various functional models (e.g., boss/worker, work crew, pipelining). It provides implementation guidelines for developing multithreaded applications, detailing:

  • Thread management: creation, execution control, setting attributes (scheduling policy, priority, stack size, contention scope), termination, and cancellation.
  • Synchronization: extensive coverage of mutexes, condition variables, and read-write locks to ensure data integrity and prevent race conditions and deadlocks.
  • Memory management: strategies for sharing static, stack, and dynamic memory, managing thread stacks, and addressing granularity issues.
  • Error handling: including a dedicated exceptions package for robust error detection and recovery.
  • Library development: best practices for writing reentrant and thread-safe libraries, managing dependencies on non-thread-safe code, and one-time initialization.

It offers detailed reference information for two main interfaces:

  • The pthread interface, an implementation of the IEEE POSIX 1003.1-1996 standard with SUSV2/UNIX98 extensions, for portable multithreaded applications.
  • The tis (thread-independent services) interface, an HP proprietary offering designed for building thread-safe libraries that can be used in both single-threaded and multithreaded contexts without direct thread creation.

Finally, the document includes platform-specific considerations for Tru64 UNIX and OpenVMS environments, debugging information, and migration guidance for applications moving from older d4 (DCEthread) interfaces.

AA-RH9RC-TE
April 2002
550 pages
Quality

Original
1.0MB

Site structure and layout ©2025 Majenko Technologies