What is the difference between mutex and semaphore?

Answer Posted / rohit

Apart from counting behaviour the biggest differnce is in
scope of mutex and semaphore. Mutex have process scope that
is it is valid within a process space and can be used for
thread synchronization (hence light weight), semaphore are
can be used accross process space and hence can be used for
inter process synch.

However on RTOS this distinction is not applicable due to
flat process space hence only semaphores are supported on
typical RTOS.

Is This Answer Correct ?    31 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Under what circumstances do page faults occur?

645


What is normal operating system?

542


How is the maximum addressable memory calculated?

549


Does uninstalling a program delete it?

538


Where is program files located?

562






Can I use chkdsk on ssd?

533


How does thread synchronization occur in a monitor?

549


Explain a system in safe state?

567


What are the main functions of a kernel?

558


What is time- sharing system?

583


Why use 64bit excel?

507


Explain briefly about processor and its functioning?

593


How many gb of ram can 64 bit use?

588


What is mutual exclusion and multithreading in OS?

612


Name the functions constituting the os's memory management.

575