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 / mickey

Modified question is - What's the difference between A mutex
and a "binary" semaphore in "Linux"?

Ans: Compiled from above correct answers -

Following are the differences –
i) Scope – The scope of mutex is within a process address
space which has created it and is used for synchronization
of threads. Whereas semaphore can be used across process
space and hence it can be used for interprocess synchronization.

ii) Mutex is lightweight and faster than semaphore. Futex is
even faster.

iii) Mutex can be acquired by same thread successfully
multiple times with condition that it should release it same
number of times. Other thread trying to acquire will block.
Whereas in case of semaphore if same process tries to
acquire it again it blocks as it can be acquired only once.

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by parallel processing?

1003


What are the various capacities in which a ram is available?

946


Does ram affect excel performance?

881


How does thread synchronization occur in a monitor?

980


Does chkdsk delete files?

953


Is faster ram worth it?

896


What is the 4 layer model?

932


What are the functions of operating system?

989


What is starvation and aging?

1078


Does 64 bit require uefi bios?

930


What do you mean by ram?

978


How you can detect deadlock condition?

1068


Explain the difference between trap and trapdoor?

966


Stable storage cannot be implemented. (A) Explain why it cannot be. (B) Explain how database system deal with database applications

2180


Differentiate between the user mode and monitor mode.

1035