JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Multithreaded Programming Guide     Oracle Solaris 11 Express 11/10
search filter icon
search icon

Document Information


1.  Covering Multithreading Basics

Multithreading Terms

Solaris Multithreading Libraries and Standards

Benefiting From Multithreading

Improving Application Responsiveness

Using Multiprocessors Efficiently

Improving Program Structure

Using Fewer System Resources

Combining Threads and RPC

Multithreading Concepts

Concurrency and Parallelism

Multithreading Structure

User-Level Threads

User-Level Threads State

Thread Scheduling

Thread Cancellation

Thread Synchronization

Using the 64-bit Architecture

2.  Basic Threads Programming

3.  Thread Attributes

4.  Programming with Synchronization Objects

5.  Programming With the Solaris Software

6.  Programming With Solaris Threads

7.  Safe and Unsafe Interfaces

8.  Compiling and Debugging

9.  Programming Guidelines

A.  Extended Example: A Thread Pool Implementation


Solaris Multithreading Libraries and Standards

The concept of multithreaded programming goes back to at least the 1960s. Multithreaded programming development on UNIX systems began in the middle 1980s. While agreement existed about what multithreading is and the features necessary to support multithreading, the interfaces used to implement multithreading have varied greatly in the past.

For several years, POSIX (Portable Operating System Interface) 1003.4a worked on standards for multithreaded programming. The standard was eventually ratified and is now part of The Single UNIX Specification (SUS). The latest specification is available at The Open Group website. Beginning with the Solaris 10 release, the Solaris OS conforms to The Open Group's UNIX 03 Product Standard, or SUSv3.

Before the POSIX standard was ratified, the Solaris multithreading API was implemented in the Solaris libthread library, which was developed by Sun and later became the basis for the UNIX International (UI) threads standard. The libthread library was introduced in the Solaris 2.2 release in 1993. Support for the POSIX standard was added with the libpthread API in the Solaris 2.5 release in 1995, and both APIs have been available since. The libthread and libpthread libraries were merged into the standard libc C library beginning in the Solaris 10 release.

The libthread and libpthread libraries are maintained to provide backward compatibility for both runtime and compilation environments. The and shared objects are implemented as filters on See the libthread(3LIB) and libpthread(3LIB) man pages for more information.

While both thread libraries are supported, the POSIX library should be used in most cases. The threads(5) man page documents the differences and similarities between POSIX threads and Solaris threads.

This Multithreaded Programming Guide is based on the latest revision of the POSIX standard IEEE Std 1003.1:2001 (also known as ISO/IEC 9945:2003 and as The Single UNIX Specification, Version 3).

Subjects specific to Solaris threads are covered in the Chapter 6, Programming With Solaris Threads.