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)
using stale data. When one processor accesses the data (especially for write operations), the other proces-
sors must flush the stale data from their caches. If multiple processors repeatedly read/write the same
data, this can lead to cache-thrashing which slows execution of the instruction stream. This can also occur
when threads access separate data items which just happen to reside in the same hardware-cachable unit
(called a cache line). This latter situation is called false-sharing which can be avoided by spacing data such
that popular items are not stored close together.
GLOSSARY
The following definitions were extracted from the text ThreadTime by Scott J. Norton and Mark D.
DiPasquale, Prentice-Hall, ISBN 0-13-190067-6, 1996.
Application Programming Interface (API)
An interface is the conduit that provides access to an entity or communication between entities. In the pro-
gramming world, an interface describes how access (or communication) with a function should take place.
Specifically, the number of parameters, their names and purpose describe how to access a function. An API
is the facility that provides access to a function.
Async-Cancel Safe
A function that may be called by a thread with the cancelability state set to
PTHREAD_CANCEL_ENABLE
and the cancelability type set to
PTHREAD_CANCEL_ASYNCHRONOUS
. If a thread is canceled in one of
these functions, no state is left in the function. These functions generally do not acquire resources to per-
form the function’s task.
Async-Signal Safe
An async-signal safe function is a function that may be called by a signal handler. Only a restricted set of
functions may safely be called by a signal handler. These functions are listed in section 3.3.1.3 of the
POSIX.1c standard.
Asynchronous Signal
An asynchronous signal is a signal that has been generated due to an external event. Signals sent via
kill() and signals generated due to timer expiration or asynchronous I/O completion are all examples of
asynchronously generated signals. Asynchronous signals are delivered to the process. All signals can be
generated asynchronously.
Atfork Handler
Application-provided and registered functions that are called before and after a
fork() operation. These
functions generally acquire all mutex locks before the
fork() and release these mutex locks in both the
parent and child processes after the fork().
Atomic Operation
An operation or sequence of events that is guaranteed to complete as if it were one instruction.
Barrier
A synchronization primitive that causes a certain number of threads to wait or rendezvous at specified
points in an application. Barriers are used when a application needs to ensure that all threads have com-
pleted some operation before proceeding onto the next task.
Bound Thread
A user thread that is directly bound to a kernel-scheduled entity. These threads contain a system schedul-
ing scope and are scheduled directly by the kernel.
Cache Thrashing
Cache thrashing is a situation in which a thread executes on different processors, causing cached data to be
moved to and from the different processor caches. Cache thrashing can cause severe performance degrada-
tion.
Cancellation Cleanup Handler
An application-provided and registered function that is called when a thread is canceled. These functions
generally perform thread cleanup actions during thread cancellation. These handlers are similar to signal
handlers.
HP-UX Release 11i: December 2000 − 9 − Section 3−−639
___
___