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

Explain about Operating System Security?

1 Answers  


Explain thrashing.

0 Answers  


Is 32 gigs of ram overkill?

0 Answers  


Explain time-stamping?

0 Answers   Accenture,


Explain booting the system in operating system.

0 Answers  






What are the sub-components of I/O manager in Windows NT?

1 Answers  


What is a device queue?

0 Answers  


What's the difference between x86 and x64?

0 Answers  


What first program that the computer runs when the power is turn on?

0 Answers   Arigo Infotech,


What is the difference between soft and hard links?

0 Answers  


What are a trap and trapdoor?

0 Answers  


What are different types of interprocess communication methods?

0 Answers  


Categories