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 |
Stimulate calculator using Switch-case-default statement for two numbers
What will be your course of action for a push operation?
which do you prefer C or Pascal?
what are bitwise shift operators?
#include main() { int i=1,j=2; switch(i) { case 1: printf("GOOD"); break; case j: printf("BAD"); break; } }
what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9
When do you say that a digraph is acyclic A)if and only if its first search does not have back arcs B)a digraph is acyclic if and only if its first search does not have back vertices C)if and only if its first search does not have same dfnumber D)None of these
int main(){ float f=8.0; if(f==8.0) printf("good"); else printf("bad"); } what is the answere and explain it?
Go through the following code sinippet char a[20]; a="Hello Orcale Test"; will this compile?
Who is the founder of c language?
to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?
what does " calloc" do?