Answer Posted / 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 |
Post New Answer View All Answers
What is the difference between NULL and NUL?
What is void c?
What is the maximum length of an identifier?
How does selection sort work in c?
What will the code below print when it is executed? int x = 3, y = 4; if (x = 4) y = 5; else y = 2; printf ("x=%d, y=%d ",x,y);
What is the general form of #line preprocessor?
Explain what is the difference between null and nul?
Stimulate calculator using Switch-case-default statement for two numbers
What is difference between Structure and Unions?
Write a program in c to replace any vowel in a string with z?
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
Write a program to swap two numbers without using a temporary variable?
Is c pass by value or reference?
Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;
What are the types of type specifiers?