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
5.Call by value and Call by reference with program?
how does database connection using ADO.NET?
write the a cl program with the following specification A. Accept 2 parameters-date and date type B. if date type is J then convert date to *MDY format C. if date type is M convert date to *JUL format 4.send a program message with the value of converted date Please explain for each with coding?
Which method protects back button to retrieve old value from previous page in Struts.
Always use scope terminator like End-If with IF, End- Evaluate with Evaluate statement.Can somebody explain me the detail logical explanation?
Display names and numbers of employees who have 5 years or more experience and salary less than Rs.15000 using array of structures (name, number, experience and salary)
Suppose server object is not loaded into the memory, and the client request for it , what will happen?
diffrence between oracle apps , .NET , SAP
WHat is execution in manual testing and when will we start execution and what language we use in execution
how do you generate source code for the automatic generation for receipt number
Mainly Related to Oracle, DBMS , Oracle Stored Procedures, Functions, Oracle 9i Architecture, Redo logs..., Views,
what is the diffrence between software and hardware language?
how to remove header and footer in jcl using sort utility
what are other resources are needed for this mantis?
3. What is the difference between testing and Quality Assurance?