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

Briefly explain thrashing.

1066


Is a directory a regular file?

1006


WHATE IS DIFFERENT BETWEEN ANLOG , PLC & DCS OR EXPLAIN ANALOG / PLC / DCS SYSTEME

3027


What is synchronously and asynchronously?

1008


Can ram affect fps?

940


Explain the different types of fragmentation?

1165


Can a 64 bit computer run 32 bit programs?

964


What are the different job scheduling in operating systems?

1016


Define page fault interrupt?

1146


What is normal operating system?

1024


How can the FCFS scheduling be made better?

1191


Explain briefly about compiler and its functioning?

1096


Can a 64 bit run a 32bit program?

964


Give an example of Priority Inversion in Scheduling. What are the consequences of Priority Inversion?

1025


What replaced ifconfig?

1120