Answer Posted / rock star
Mutual exclusion (often abbreviated to mutex) algorithms are
used in concurrent programming to avoid the simultaneous use
of a common resource, such as a global variable, by pieces
of computer code called critical sections.
Examples of such resources are fine-grained flags, counters
or queues, used to communicate between code that runs
concurrently, such as an application and its interrupt
handlers. The problem is acute because a thread can be
stopped or started at any time.
To illustrate: suppose a section of code is mutating a piece
of data over several program steps, when another thread,
perhaps triggered by some unpredictable event, starts
executing. If this second thread reads from the same piece
of data, the data, in the process of being overwritten, is
in an inconsistent and unpredictable state. If the second
thread tries overwriting that data, the ensuing state will
probably be unrecoverable. These critical sections of code
accessing shared data must therefore be protected, so that
other processes which read from or write to the chunk of
data are excluded from running.
A mutex is also a common name for a program object that
negotiates mutual exclusion among threads, also called a lock.
Is This Answer Correct ? | 8 Yes | 3 No |
Post New Answer View All Answers
what is the current salary package in India for a lamp programmer
When will you use shell script/Perl ahead of C/C++?
What is web.configuration? how is it work? & wht is use this?
Delta 5 weight scale not connect with oracle application what i can do?
hi viewers, tell me,what is scripting and programming, define and difference...pls
hi This is radhika.Can anyone help me to know the question papers of NATIONAL INFORMATICS CENTRE for the post of scientific officer/engineer? if anyone know plz tell me question paper pattern
can we extend a class having only one parameterised constructor.Suggest the process to do it.
what is the similarity between networking devices?
How do you pass variables forwrd to future CECI sessions
public static void main(String args[]) describe it
What is test execution and when will we start execution please send me one example for this question
they asked me about srs (software requirement specifcation)? how can i get anydocumentation about srs & other documnts infomation like bdd, in testing? its urgent?
how can i split string in a textbox in windows appication using C#.net
What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
How to get the index of the clicked field in reports in ABAP?