Mutex: A mutex is a software entity that provides mutually exclusive control to a shared resource -- typically an area of memory. The intent of mutexes is to synchronize parallel operations and to prevent race conditions where parallel operations may produce substantially different results depending on which gets to what point in processing when.

Mutexes are only one of several resource locking tools. Mutexes are primarily intended to control resource usage by high level entities such as programs or program threads.

Mutexes are part of the POSIX threads models. Both Windows and Linux support Mutex objects that can be used by processes to control access to a shared resource. Windows mutex support is said to be somewhat eccentric.

Usage of Mutexes is not as simple as it might seem on the surface. For example, if a program is used recursively and uses a Mutex, it must not block on the recursive call, but also must not release the resource until the highest level or recursion is exited. There are also issues with releasing or failing to release mutexes when an exception occurs.

http://cgi-bin/viewcvs.cgi/boostjp/boost/libs/thread/doc/mutex_concept.html?revision= Return To Index Copyright 1994-2002 by Donald Kenney.