What is mutex precisely used for?

Answers were Sorted based on User's Feedback



What is mutex precisely used for?..

Answer / rohil

The mutex (mutually exclusion) variables are used thread
synchroniization and for protecting the shared memory(data
segment) when multiple writes occur

Is This Answer Correct ?    23 Yes 0 No

What is mutex precisely used for?..

Answer / achal

The above is correct. To be more specific, a CPU might need
to access some hardware device say I2c interface. Now if 2
processes in running state try to acquire and use I2c for
some data transfer, it might create problems, when one of
them hasn't finished its operations with the device. So
whenever some process has to make use of I2C it should lock
upon the mutex object for I2c device. And after the
operation gets finished it unlocks the mutex. Now some
other process can use I2c by mutex lock.
Similarly mutex object can be used to safegaurd some other
device resources.

Is This Answer Correct ?    22 Yes 4 No

Post New Answer

More Embedded Systems AllOther Interview Questions

Explain difference between risc and cisc processor?

0 Answers  


Explain what is a watchdog timer?

0 Answers  


If you buy some rtos, what are the features you look for in?

0 Answers  


How do you learn about the latest technology trends?

0 Answers  


Why is the single responsibility principle important?

0 Answers  






Can we put breakpoint inside isr?

0 Answers  


Why is it better to use multi-threading polling instead of a single threading model?

0 Answers  


Explain me what is the main function of multiplexed address/data bus?

0 Answers  


What is your experience with technical documentation?

0 Answers  


What is something substantive that you've done to improve as a developer in your career?

0 Answers  


What is an embedded system?

0 Answers  


Explain me what is kernel paging?

0 Answers  


Categories