HP-UX Reference (11i v1 00/12) - 3 Library Functions N-Z (vol 7)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/nan.3m
________________________________________________________________
___ ___
p
pthread(3T) pthread(3T)
(Pthread Library)
Multiprocessor
A system with two or more processors (CPUs). Multiprocessors allow multithreaded applications to obtain
true parallelism.
Multithreading
A programming model that allows an application to have multiple threads of execution. Multithreading
allows an application to have concurrency and parallelism (on multiprocessor systems).
Mutex
A mutex is a mutual exclusion synchronization primitive. Mutexes provide threads with the ability to regu-
late or serialize access to process shared data and resources. When a thread locks a mutex, other threads
trying to lock the mutex block until the owning thread unlocks the mutex.
POSIX
Portable Operating System Interface. POSIX defines a set of standards that multiple vendors conform to in
order to provide for application portability. The Pthreads standard (POSIX 1003.1c) provides a set of port-
able multithreading APIs to application developers.
Priority Inversion
A situation where a low-priority thread has acquired a resource that is needed by a higher priority thread.
As the resource cannot be acquired, the higher priority thread must wait for the resource. The end result is
that a low-priority thread blocks a high-priority thread.
Process
A process can be thought of as a container for one or more threads of execution, an address space, and
shared process resources. All processes have at least one thread. Each thread in the process executes
within the process’ address space. Examples of process-shared resources are open file descriptors, message
queue descriptors, mutexes, and semaphores.
Process Control Block (PCB)
This structure holds the register context of a process.
Process Structure
The operating system maintains a process structure for each process in the system. This structure
represents the actual process internally in the system. A sample of process structure information includes
the process ID, the process’ set of open files, and the signal vector. The process structure and the values
contained within it are part of the context of a process.
Program Counter (PC)
The program counter is part of the register context of a process. It holds the address of the current instruc-
tion to be executed.
Race Condition
When the result of two or more threads performing an operation depends on unpredictable timing factors,
this is a race condition.
Read-Write Lock
A read-write lock is a synchronization primitive. Read-write locks provide threads with the ability to regu-
late or serialize access to process-shared data and resources. Read-write locks allow multiple readers to
concurrently acquire the read lock whereas only one writer at a time may acquire the write lock. These
locks are useful for shared data that is mostly read and only rarely written.
Reentrant Function
A reentrant function is one that when called by multiple threads, behaves as if the function was called seri-
ally, one after another, by the different threads. These functions may execute in parallel.
Scheduling Allocation Domain
The set of processors on which a thread is scheduled. The size of this domain may dynamically change over
time. Threads may also be moved from one domain to another.
HP-UX Release 11i: December 2000 − 11 − Section 3−−641
___
___