What is the difference between a mutex and a semaphore in Linux?



What is the difference between a mutex and a semaphore in Linux?..

Answer / Kapil Dubey

A Mutex (MUTEx CHARacteristics: mutual exclusion) is a synchronization object that allows only one thread to access a resource at a time. A Semaphore (SEMAPHORE: used for counting, not just exclusion) can be used to synchronize multiple resources and can be used to manage tasks in a more complex environment.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Linux General Interview Questions

How do you check the status of all the services?

1 Answers  


What is posix in linux?

1 Answers  


What are the kinds of permissions under linux?

1 Answers  


Are linux and unix the same thing?

1 Answers  


Does nasa use linux?

1 Answers  


We saw the mention on the linux bios website about one million devices shipped with linux bios. Could you tell us more about these devices?

1 Answers  


Is it possible to reduce the size of a already created partition?

1 Answers  


How many viruses are there for linux?

1 Answers  


How can you terminate vi session?

1 Answers  


What is flag?

1 Answers  


What is apt get linux?

1 Answers  


What is the major advantage of a hash table?

1 Answers  


Categories