Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

difference between semaphores and mutex?

Answer Posted / selvakumar

"Mutexes are typically used to serialise access to a
section of re-entrant code that cannot be executed
concurrently by more than one thread. A mutex object only
allows one thread into a controlled section, forcing other
threads which attempt to gain access to that section to
wait until the first thread has exited from that section."

"A semaphore restricts the number of simultaneous users of
a shared resource up to a maximum number. Threads can
request access to the resource (decrementing the
semaphore), and can signal that they have finished using
the resource (incrementing the semaphore)."

Is This Answer Correct ?    15 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between NULL and NUL?

1351


What is void c?

1163


What is the maximum length of an identifier?

1231


How does selection sort work in c?

1097


What will the code below print when it is executed?   int x = 3, y = 4;         if (x = 4)                 y = 5;         else                 y = 2;         printf ("x=%d, y=%d ",x,y);

1944


What is the general form of #line preprocessor?

1039


Explain what is the difference between null and nul?

1214


Stimulate calculator using Switch-case-default statement for two numbers

3037


What is difference between Structure and Unions?

1310


Write a program in c to replace any vowel in a string with z?

1170


Which of the following operators is incorrect and why? ( >=, <=, <>, ==)

1225


Write a program to swap two numbers without using a temporary variable?

1179


Is c pass by value or reference?

1104


Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;

1127


What are the types of type specifiers?

1095