HP-UX Reference (11i v2 04/09) - 3 Library Functions N-Z (vol 7)
p
pthread(3T) pthread(3T)
(Pthread Library)
are permanently deadlocked. Deadlocks can occur with any number of resource holding threads. An
interactive deadlock involves two or more threads. A recursive (or self) deadlock involves only one
thread.
Detached Thread
A thread whose resources are automatically released by the system when the thread terminates. A
detached thread cannot be joined by another thread. Consequently, detached threads cannot return an
exit status.
Joinable Thread
A thread whose termination can be waited for by another thread. Joinable threads can return an exit
status to a joining thread. Joinable threads maintain some state after termination until they are joined
by another thread.
Kernel Mode
A mode of operation where all operations are allowed. While a thread is executing a system call it is exe-
cuting in kernel mode.
Kernel Space
The kernel program exists in this space. Kernel code is executed in this space at the highest privilege
level. In general, there are two privilege levels: one for user code (user mode) and the other for kernel
code (kernel mode).
Kernel Stack
When a thread makes a system call, it executes in kernel mode. While in kernel mode, it does not use the
stack allocated for use by the application. Instead, a separate kernel stack is used while in the system
call. Each kernel-scheduled entity, whether a process, kernel thread or lightweight process, contains a
kernel stack. See Stack for a generic description of a stack.
Kernel Thread
Kernel threads are created by the thread functions in the threads library. Kernel threads are kernel-
scheduled entities that are visible to the operating system kernel. A kernel thread typically supports one
or more user threads. Kernel threads execute kernel code or system calls on behalf of user threads.
Some systems may call the equivalent of a kernel thread a lightweight process. See Thread for a generic
description of a thread.
Lightweight Process
A kernel-scheduled entity. Some systems may call the equivalent of a lightweight process a kernel
thread. Each process contains one or more lightweight process. How many lightweight processes a pro-
cess contains depends on whether and how the process is multithreaded. See Thread for a generic
description of a thread.
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
regulate 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
portable 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
HP-UX 11i Version 2: September 2004 − 9 − Hewlett-Packard Company Section 3−−749