What's the difference between semaphore , critical sections and mutex?



What's the difference between semaphore , critical sections and mutex?..

Answer / rajji

Semaphore and mutex are the synchronising mechanisms for shared resources. And critical region is part of synchonizing schemes, means it's a part of process sections.

Normally every process will have 3 sections 1.Entry section 2.critical section 3. exit section

In these critical section is more important which tells us how to manage resources like.
In semaphores if one thread is waiting for resource then other thread which has the resource can signal the waiting thread.
In Mutex if one thead is waiting for resource then it has to wait till resource get released. This is the best mechanism for multithreading.

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More Operating Systems General Concepts Interview Questions

What is Concurrency? Expain with example Deadlock and Starvation?

5 Answers   Wipro,


what is difference between xp & 2003?

0 Answers  


what is batch programming in DOS?

1 Answers  


What is the difference between mailbox and queue?

0 Answers  


Explain Marshalling?

0 Answers   MaxSolPro,






Tell me about virtual memory?

0 Answers   Honeywell, Zomato,


What is the best page size when designing an operating system?

0 Answers  


What is micro kernel approach and site its advantages?

0 Answers  


How can a ddr1 ram be identified from a ddr2 ram module physically?

0 Answers  


hello, I want a chart which compare all scheduling algorithm performance. I want to know even they act better for I/O bound process or CPU bound process. please guide me how can I recognize the difference of scheduling algorithm? please send me the answer to : moradisomayeh@gmail.com

2 Answers  


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

0 Answers  


Explain thrashing.

0 Answers  


Categories