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...

What is the difference between mutex and semaphore?

Answer Posted / rufus v. smith

A semaphore can be claimed a preset number of times, and when this number is reached, additional claims are blocked/denied until there is a release.

A binary semaphore has a count of 1. However, this does NOT make it a mutex.

A mutex is thread-aware. Once claimed, other claims (by other threads) will be blocked/denied. However, the same thread may claim it repeatedly and not be blocked (it must be released the same number of times).

For a binary semaphore, a second claim, even from the same thread, WILL block (not a good situation if from the same thread, make sure to timeout the request)

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is vmware a hypervisor?

963


How the Kernel handles both the page stealer and the fault handler?

1091


What is the limit of ram capacity in a 32bit os?

1080


What is a critical section?

1185


Hi All, Can any one post a MS-DOS command/ utility tool, that modifies large size(nGBs) log file into MBs form the begining of log file? I will appreciate if any one give correct answer to this question. Thanks

2084


How you can check whether a machine is 64 bit or 32 bit?

1034


What are significance of semaphores?

1171


How do I scan a usb drive for errors?

1057


Should I install 32 bit or 64 bit?

1014


What is the kernel of the operating system?

981


How do I copy and paste a file location?

1044


Explain the basic concepts and hierarchy of memory?

1102


What are threads in OS?

1145


List the issues related to the handheld system.

993


How many stages are there in chkdsk?

1054