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 |
Explain what is the difference between declaring a variable and defining a variable?
Which is best linux os?
wt is diference between int and int pointer as same as float and float pointer and char and char pointer
number of times a digit is present in a number
How do you sort filenames in a directory?
what is a non volatile key word in c language?
develop algorithms to add polynomials (i) in one variable
disadvantages of realloc ?
Write a program to compare two strings without using the strcmp() function
42 Answers Accenture, Arba Minch University,
When should a type cast not be used?
what is the difference between : func (int list[], ...) or func (int *list , ....) - what is the difference if list is an array and if also if list is a pointer
how can i get the string which is having two spaces at the end.suppose the string is "Hello World ".Now at the end i have two spaces.i need to print with that spaces .