![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mutex in Perl | superuser84 | Shell Programming and Scripting | 6 | 11-13-2007 12:55 AM |
| what is diff b/w semaphore and mutex | amitpansuria | UNIX for Dummies Questions & Answers | 1 | 08-21-2007 01:45 AM |
| mutex in shell programing | zz_xm | Shell Programming and Scripting | 1 | 03-09-2005 10:53 PM |
| mutex | sagar | UNIX for Dummies Questions & Answers | 2 | 02-04-2002 06:00 PM |
| Threads and Mutex | vthasan | High Level Programming | 2 | 11-02-2001 07:34 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
They are the same data type, and both work as locks or in-memory flags to control access to some object like shared memory or protected code segments.
semaphores may have values 0 -> n where n is an arbitrary number, like 10, or 4. A mutex has two values either set = 1 or not set = 0. mutexes are typically acted upon by special functions, particularly in the pthreads library. Local event flags are the most common example of sempahore use. Mutexes are used extensively in threads programming, for example. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|