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
How does the TCP handle the issue of multiplexing?
I want sample papers for NIC Examination. Plz send them to my mail Id das.neelam@gmail.com . Plz send it today, tomorrow i've the exam.
How does the type system works when there is interoperability between a COM and .Net, i mean what exactly happens there
Bonjour, svp je veut voir comment envoyer un mail en java et comment changer le droit d'accé d'un fichier en java: de lecture en lecture/écriture et merci d'avance ;)
In an customer exit (include Z) program, only the last record is getting fetched. The exit is getting called after pressing save button. What to write for fetching the first record ? Before saved to a SAP table how can i call all these records in an itab in the exit ?
Hi Guys, This is Rama, right now I am working as a Software Test Engineer in Gurgoan and I have over all 3 years of testing expoeriance. Right now I am looking for a change. Can any body help me out to find a job in south india. Thanks in Advance
how to check single or double byte in struts
What is the merger sort principle and its time complexity.
MOV.CB 007H,ADCON1 MOVE.CT 001H,_OPTION_REG_7 MOV.CB 007H,CMCON
How to print No.of.rows affected after updation using ADO.Net
what is web configuration file
What are the tasks performed by a Team Lead
in IT trend mantis meant what? how to know mantis in IT trends? detail description about mantis?
any drawback are there in mantis?
Tell me the jobs for the MCA Fresher in delhi, Noida..