Mutex

This is a discussion on Mutex within the Windows Programming forums, part of the Platform Specific Boards category; What is a mutex?...

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

    Mutex

    What is a mutex?

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    156
    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
    Posts
    23
    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, 05:04 AM
  2. mutex problem
    By radeberger in forum C++ Programming
    Replies: 16
    Last Post: 03-20-2009, 05:24 PM
  3. Yet another n00b in pthreads ...
    By dimis in forum C++ Programming
    Replies: 14
    Last Post: 04-07-2008, 01: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, 01:28 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21