what is the advantage of using SEMAPHORES to ORDINARY
VARIABLES???
Answers were Sorted based on User's Feedback
Answer / sachin dohre
Working of Semaphore is Atomic i.e till semaphore released
no change in shared memory could occur,, while in case of
variables it could be changed while context switching
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / test
semaphores helps is a varible which is used to protect the shared data .hence avoiding the coruption of data by the threads acting simultaniously..
Is This Answer Correct ? | 7 Yes | 4 No |
What is external variable in c?
how to find the given number is prime or not?
What is true about the following C Functions a.Need not return any value b.Should always return an integer c.Should always return a float d.Should always return more than one value.
A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile
what's the o/p int main(int n, char *argv[]) { char *s= *++argv; puts(s); exit(0); }
What's wrong with "char *p; *p = malloc(10);"?
can you explain in brief what is "r+" mode in a file... i know that it si used to read and modify rhe existing content.... but explalanation about the file pointer in "r+" mode i wann to know???????????
what do you mean by inline function in C?
the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b
is assignment operator is arithmatic or not
What compilation do?
7 Answers Geometric Software, Infosys,
Find the O/p of the following struct node { char *name; int num; }; int main() { struct node s1={"Harry",1331}; struct node s2=s1; if(s1==s2) printf("Same"); else printf("Diff"); }