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 cohesion and coupling in c?
Explain why C language is procedural?
What is the size of enum in bytes?
Explain the difference between malloc() and calloc() function?
Why C language is a procedural language?
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles
One of the Institutes contains 5 student groups. Every group contains 4 students. Institute wants to store student group’s details in array. Group should contain group member’s details (name and registration number and age), project name, and mark of the group.
How can I run c program?
Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.
Are there namespaces in c?
How do you write a program which produces its own source code as output?
What is the default value of local and global variables in c?
Find duplicates in a file containing 6 digit number (like uid) in O (n) time.
What are the standard predefined macros?
What is a c token and types of c tokens?