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

can a pointer be volatile ? Explain.

0 Answers  


What is the difference between "set" logic, and "procedural" logic. When would you use each one and why?

0 Answers  


Would you call yourself a craftsman (craftsperson) and what does that word mean to you?

0 Answers  


Describe, in as much detail as you think is relevant, as deeply as you can, what happens when I type "cnn.com" into a browser and press "go".

0 Answers  


Discuss the differences between mocks and stubs/fakes and where you might use them (answers aren't that important here, just the discussion that would ensue).

0 Answers  






Significance of watchdog timer in embedded systems.

0 Answers  


Tell me what type of scheduling is there in rtos?

0 Answers  


How are local and global variables are allocated by compiler.

0 Answers  


Tell me what are the different types of customizations that is used with the “volatile” keyword?

0 Answers  


Tell me how to create a child process in linux?

0 Answers  


What are the qualifiers in c?

0 Answers  


How can you ensure that debugging a program while it's being used will not affect its functionality?

0 Answers  


Categories