Thread: Mutex

  1. #1
    Registered User DutchStud's Avatar
    Join Date
    Oct 2001


    What is a mutex?

  2. #2
    Registered User
    Join Date
    Sep 2001
    It is a kernal object used for interprocess synchronization. Its state is set to signaled when it is not owned by any thread, and nonsignaled when it is owned. Only one thread at a time can own a mutex. This allows large sequences of code to be atomic or treated as one operation. If this is not done where threads share the same resource we get unexpected results due to incomplete operations, such as data writes to many files.

    An excellent book for multithreading is Win32 Multithreaded Programming, published by O'Reilly.

  3. #3
    Registered User
    Join Date
    Oct 2001
    As an addition info; Mutex is derive from two words "Mutually" and Exclusive". It is very usefull to synchronize threads running in different processes.
    If they can, why can't I...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Mutex and Shared Memory Segment Questions.
    By MadDog in forum Linux Programming
    Replies: 14
    Last Post: 06-20-2010, 04:04 AM
  2. mutex problem
    By radeberger in forum C++ Programming
    Replies: 16
    Last Post: 03-20-2009, 04:24 PM
  3. Yet another n00b in pthreads ...
    By dimis in forum C++ Programming
    Replies: 14
    Last Post: 04-07-2008, 12:43 AM
  4. Thread Synchronization in Win32
    By passionate_guy in forum C Programming
    Replies: 0
    Last Post: 02-06-2006, 05:34 AM
  5. Mutex - location of lock/unlock
    By cjschw in forum C++ Programming
    Replies: 1
    Last Post: 08-14-2003, 12:28 PM