what is mutex?

Answers were Sorted based on User's Feedback



what is mutex?..

Answer / 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

what is mutex?..

Answer / nadeem khokhar

A mutex and the binary semaphore are essentially the same. Both can take values: 0 or 1. However, there is a significant difference between them that makes mutexes more efficient than binary semaphores.

A mutex can be unlocked only by the thread that locked it.

Is This Answer Correct ?    2 Yes 0 No

what is mutex?..

Answer / sunildummati

Short for mutual exclusion object. In computer
programming, a mutex is a program object that allows
multiple program threads to share the same resource, such
as file access, but not simultaneously. When a program is
started, a mutex is created with a unique name. After this
stage, any thread that needs the resource must lock the
mutex from other threads while it is using the resource.
The mutex is set to unlock when the data is no longer
needed or the routine is finished.

(2) When spelled MuTeX, a package of macros for the TeX
typesetting system that supports musical notation. MuTeX
was written by Andrea Steinbach and Angelika Schofer, as a
master's thesis at Rheinische Friedrich-Wilhelms
University.

Is This Answer Correct ?    0 Yes 0 No

what is mutex?..

Answer / rajesh verma

A Mutex is a mutually exclusive flag. It acts as a gate keeper to a section of code allowing one thread in and blocking access to all others. This ensures that the code being controled will only be hit by a single read at a time. Just be sure to release the mutex when you are

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Programming Languages AllOther Interview Questions

1) How can u create the table?

0 Answers   IBM,


what are the 3 forms of a prolog term

0 Answers  


Data Structure: Show that if k is the smallest integer greater than or equal to n+ (log2n)-2, k comparisons are necessary and sufficient to find the largest and second largest elements of a set of n distinct elements. (k comparisons are required to find what you are looking for, but no more than that are needed)

0 Answers   Student,


what is the system development cycle

0 Answers  


if 3 duplicate records, by keeping one original and one duplicate record, and how to delete remaining 2 duplicates in sql server 2008

0 Answers  






what is the meaning of without standing arrears?

0 Answers   TCS,


What is meant byStatic Variable ?

7 Answers   Mascot,


Given: (x-2)(x+3)= 100; solve the equation for x using any programing language.

2 Answers   Amazon, Manhattan,


How many types of list exist in the HTML

2 Answers  


What is SOLID Principle in Programming Language?

0 Answers   NA,


Hi..Am done with my Masters recently..Am planning to learn TIBCO.. could anyone suggest me about how the job market will be and Is there any course necessary to learn prior to Tibco..i mean any prerequisite. I dnt have any knowledge on PL/SQL thats it... Plz suggest me in a best way...

0 Answers  


1. Consider the following input and generate the object code using single pass assembler. JOHN START 0 USING *,15 L 1,FIVE A 1,FOUR ST 1,TEMP FOUR DC F’4’ FIVE DC F’5’ TEMP DS ‘F END

0 Answers   Wipro,


Categories