Definitions
The following definitions and concepts are important to understanding the features of the Synchronization package.
*Synchronization—The use of mechanisms or processes whereby undesirable interleaving of operations or interference between concurrent threads is prevented. Synchronization is generally accomplished using one of two techniques: mutual exclusion or condition synchronization.
*Mutual exclusion—Combining fine-grained atomic actions into coarse-grained actions and arranging to make these composite actions atomic.
*Condition synchronization—A process or mechanism that delays the execution of a thread until the program state satisfies some predicate or condition.
*Blocked threads—A thread that is no longer executing because it is delayed or waiting on some synchronization mechanism.
*Unblocked threads—Once a thread is unblocked, awakened, or signaled, it becomes runnable and eligible for further execution. Not all synchronization mechanisms use blocking to delay a thread. Some mechanisms are implemented using polling loops or spin-locks.