What is mutex precisely used for?
Answers were Sorted based on User's Feedback
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 |
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 |
Describe a time when you collaborated with designers and engineers to deploy a new product. What was your role?
What type of scheduling is there in rtos?
Tell me why do we need virtual device drivers when we have physical device drivers?
What is spin lock?
What is a memory leak? What is a segmentation fault?
What is the need for an infinite loop in embedded systems?
What do you mean by interrupt latency?
How does combination of functions reduce memory requirements in embedded systems?
What is something substantive that you've done to improve as a developer in your career?
Explain the components of an embedded system?
Left to your own devices, what would you create?
Tell me what are the functional requirements that are used in the embedded systems?