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

Will my laptop run faster with more ram?

517


How do I know if my cpu is overheating?

534


How does swapping result in better memory management?

818


What is the meaning of Thread Priority?

620


What are device drivers?

618






What are the 7 c's of communication?

556


What is best free operating system?

572


What kind of memory is a ram categorized as?

586


How can you pause the execution of a Thread for a certain amount of time?

619


What is feram?

602


Will chkdsk fix corrupt files?

552


How many stages are there in chkdsk?

560


Can a system detect starvation?

541


How do I find system information?

558


How does the system detect thrashing? Once it detects thrashing, what can the system do to eliminate this problem?

863