Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is mutex precisely used for?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain whether we can use semaphore or mutex or spinlock in interrupt context in linux kernel?

866


Describe to me some bad code you've read or inherited lately.

789


what is a pure function in arm terminology?

1010


Tell me why embedded system is useful?

812


Implement a using on .

814


What's the difference between asynchrony and concurrency?

968


What is interrupt latency? How can you reduce it?

806


Given time, cost, client satisfaction and best practices, how will you prioritize them for a project you are working on? Explain why.

880


What kinds of problems can you hit with locking model? And a lockless model?

805


What does DMA address will deal with?

913


what is embedded system in a computer system?

1018


What are some examples of anti-patterns?

969


What trade offs do you have for resource contention?

842


Explain me what are the rules followed by mutexes?

777


Explain the properties of a object oriented programming language.

823