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 / henry denial s

"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 mutex is really a semaphore with value 1

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 ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

For a deadlock to occur what are the necessary conditions

1127


Considering notepad/IE or any other thing as process, What will happen if you start notepad or IE 3 times ? Where three processes are started or three threads are started?

1300


What is the 4 layer model?

1044


Why paging is used in os?

1089


Explain the reasons for process suspension?

1087


How are data structures handled by ntfs and how does it recover from a crash?

1300


What mean operating system?

1067


Tell me about different OS related issues for a given set of C-programs (mainly address issues address space, paging etc.)

1124


What is raid? What are the different raid levels?

1138


What are the operating system types?

1098


What resources are used when a thread created? How do they differ from those when a process is created?

1059


How do I search for a file?

1018


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

1126


Explain a system in safe state?

1101


Why would a parent process terminate a child process?

1136