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 are the disadvantages of microkernels?

0 Answers  


How do I search in terminal?

0 Answers  


Discuss some of the reasons for implementing process migration ?

1 Answers  


Explain the difference between demand-paging and pre-paging?

0 Answers  


process means?

2 Answers   BFL,






What is ie tab in chrome?

0 Answers  


What happens if we don’t override a run method?

0 Answers  


What do you call a bootable disk that contains a full usable os?

0 Answers  


Define max, min heap and search time of heap.

0 Answers   Amdocs, Tavant Technologies, Thomson Reuters, Verifone,


What is cascading termination?

0 Answers  


please prodide me nvidi placement papers

0 Answers   nvidia, TCS,


Hi All, Can any one post a MS-DOS command/ utility tool, that modifies large size(nGBs) log file into MBs form the begining of log file? I will appreciate if any one give correct answer to this question. Thanks

0 Answers  


Categories