difference between semaphores and mutex?
Answer / selvakumar
"Mutexes are typically used to serialise access to a
section of re-entrant code that cannot be executed
concurrently by more than one thread. A mutex object only
allows one thread into a controlled section, forcing other
threads which attempt to gain access to that section to
wait until the first thread has exited from that section."
"A semaphore restricts the number of simultaneous users of
a shared resource up to a maximum number. Threads can
request access to the resource (decrementing the
semaphore), and can signal that they have finished using
the resource (incrementing the semaphore)."
| Is This Answer Correct ? | 15 Yes | 2 No |
What does a pointer variable always consist of?
What are terms in math?
Is a house a shell structure?
what is difference between array and structure?
44 Answers College School Exams Tests, CTS, Google, HCL, IBM, Motorola, TCS,
write a program to remove occurrences the word from entered text?
What are file streams?
Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
Can anyone tell what is stack overflow? what precaution we should take?
What is abstract data structure in c?
what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?
What does volatile do?
how to find out the biggest element (or any other operation) in an array which is dynamic. User need not to mention the array size while executing.