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

If your database was under a lot of strain, what are the first few things you might consider to speed it up?

0 Answers  


Give an example of troubleshooting on embedded targets. Explain the process step-by-step.

0 Answers  


Describe the structure and contents of a design document, or a set of design documents, for a multi-tiered web application.

0 Answers  


Explain what is semaphore?

0 Answers  


Explain what is the difference between mutexes and semaphores?

0 Answers  






What is the need for dmac in es?

0 Answers  


What are the advantages and disadvantages of embedded system?

0 Answers  


Have you developed software testing procedures for new systems and performed qa, quality assurance, or audits?

0 Answers  


Explain the significance of watchdog timer in embedded systems?

0 Answers  


How do you identify hardware errors?

0 Answers  


What does malloc do? What will happen if we have a statement like malloc(sizeof(0));

0 Answers  


Explain what is return type of isr?

0 Answers  


Categories