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.
Return To Index
Copyright 1994-2002 by Donald Kenney.