| |
| |
| |
Introduction | |
| |
| |
| |
Concepts | |
| |
| |
Background: Traditional Operating Systems | |
| |
| |
What Is a Thread? Kernel Interaction | |
| |
| |
The Value of Using Threads | |
| |
| |
What Kind of Programs to Thread? What About Shared Memory? Threads Standards | |
| |
| |
Performance | |
| |
| |
| |
Foundations | |
| |
| |
Implementation vs. Specification | |
| |
| |
Thread Libraries | |
| |
| |
The Process Structure | |
| |
| |
Lightweight Processes | |
| |
| |
Solaris Multithreaded Model | |
| |
| |
System Calls | |
| |
| |
Signals | |
| |
| |
| |
Lifecycle | |
| |
| |
Thread Lifecycle | |
| |
| |
| |
Scheduling | |
| |
| |
Different Models of Kernel Scheduling | |
| |
| |
Thread Scheduling | |
| |
| |
Context Switching | |
| |
| |
When Should You Care About Scheduling? | |
| |
| |
| |
Synchronization | |
| |
| |
Synchronization Issues | |
| |
| |
Synchronization Variables | |
| |
| |
A Stoppable Producer/Consumer Example | |
| |
| |
| |
Complexities | |
| |
| |
Complex Locking Primitives | |
| |
| |
Other Synchronization Variables | |
| |
| |
Message Queues | |
| |
| |
Cross-Process Synchronization Variables | |
| |
| |
Initialization and Destruction | |
| |
| |
Synchronization Problems | |
| |
| |
| |
TSD | |
| |
| |
Thread-Specific Data | |
| |
| |
Global Variables, Constants, and Cheating | |
| |
| |
| |
Cancellation | |
| |
| |
What Cancellation Is | |
| |
| |
A Cancellation Example | |
| |
| |
Using Cancellation | |
| |
| |
Cancellation Safety | |
| |
| |
Simple Polling | |
| |
| |
| |
Signals | |
| |
| |
Signals in UNIX | |
| |
| |
The Solaris Implementation of Signal Handling | |
| |
| |
Don't Use Signal Handlers! | |
| |
| |
| |
Details | |
| |
| |
Attribute Objects | |
| |
| |
POSIX Thread Ids | |
| |
| |
Win32 Thread IDs and Thread Handles | |
| |
| |
Initializing Your Data: pthread_once() | |
| |
| |
POSIX Namespace Restrictions | |
| |
| |
Return Values and Error Reporting | |
| |
| |
Constants Comments | |
| |
| |
Pthread Futures | |
| |
| |
Pthread Extensions | |
| |
| |
Comparing the OS/2, Win32, and POSIX Libraries | |
| |
| |
| |
Libraries | |
| |
| |
The Threads Library | |
| |
| |
Multithreaded Kernels | |
| |
| |
Are Libraries Safe? Stub Functions in libc | |
| |
| |
New Semantics for System Calls | |
| |
| |
Are Libraries Safe? Threads Debugger Interface | |
| |
| |
Mixing Solaris Pthreads and UI Threads | |
| |
| |
Comparisons of Different Implementations | |
| |
| |
| |
Design | |
| |
| |
Making Libraries Safe and Hot | |
| |
| |
Manipulating Lists | |
| |
| |
Program Design | |
| |
| |
| |
Languages | |
| |
| |
C | |
| |
| |
C++ | |
| |
| |
Java | |
| |
| |
Fortran | |
| |
| |
Ada | |
| |
| |
Pascal | |
| |
| |
Smalltalk | |
| |
| |
Lisp | |
| |
| |
Eiffel | |
| |
| |
Commercial Products | |
| |
| |
Public Pthreads Implementations | |
| |
| |
| |
Tools | |
| |
| |
Static Lock Analyzer | |
| |
| |
Using a Thread-Aware, Graphical Debugger | |
| |
| |
Debug Mutexes | |
| |
| |
Protocol | |
| |
| |
TNFview | |
| |
| |
| |
Performance | |
| |
| |
Optimization: Objectives and Objections | |
| |
| |
CPU Time, I/O Time, Contention, Etc | |
| |
| |
Limits on Speedup | |
| |
| |
Benchmarks and Repeatable Testing | |
| |
| |
The Lessons of NFS | |
| |
| |
| |
Hardware | |
| |
| |
Types of Multiprocessors | |
| |
| |
Bus Architectures | |
| |
| |
Memory Systems | |
| |
| |
| |
Examples | |
| |
| |
Threads and Windows | |
| |
| |
Socket Server (Master/Slave Version) | |
| |
| |
Socket Server (Producer/Consumer Version) | |
| |
| |
Other Programs on the Web | |
| |
| |
| |
| |
| |
Internet | |
| |
| |
Threads Newsgroup | |
| |
| |
Code Examples | |
| |
| |
Vendor's Threads Pages | |
| |
| |
Threads Research | |
| |
| |
The SPILT Package for UI/POSIX Compatibility | |
| |
| |
Freeware Tools | |
| |
| |
Other Pointers | |
| |
| |
The Authors on the Net | |
| |
| |
| |
| |
| |
Books | |
| |
| |
Threads Books | |
| |
| |
Related Books | |
| |
| |
| |
| |
| |
Timings | |
| |
| |
| |
| |
| |
Mistakes | |
| |
| |
| |
| |
| |
APIs | |
| |
| |
Function Descriptions | |
| |
| |
Pthread Functions | |
| |
| |
Pthread Attributes Objects | |
| |
| |
POSIX Realtime Scheduling | |
| |
| |
Mutexes | |
| |
| |
Mutex Attributes Objects | |
| |
| |
Condition Variables | |
| |
| |
Condition Variable Attributes Objects | |
| |
| |
Cancellation Functions | |
| |
| |
Thread-Specific Data Functions | |
| |
| |
Semaphores | |
| |
| |
Signal Functions | |
| |
| |
Stdio | |
| |
| |
Glossary | |
| |
| |
Index | |