what is the advantage of using SEMAPHORES to ORDINARY
VARIABLES???

Answers were Sorted based on User's Feedback



what is the advantage of using SEMAPHORES to ORDINARY VARIABLES???..

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

what is the advantage of using SEMAPHORES to ORDINARY VARIABLES???..

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

Post New Answer

More C Interview Questions

What is external variable in c?

0 Answers  


how to find the given number is prime or not?

6 Answers   IMS, ING,


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.

11 Answers   TCS,


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

0 Answers  


what's the o/p int main(int n, char *argv[]) { char *s= *++argv; puts(s); exit(0); }

1 Answers   Motorola,






What's wrong with "char *p; *p = malloc(10);"?

5 Answers  


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???????????

2 Answers   Cognizant,


what do you mean by inline function in C?

0 Answers   IBS, TCS,


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

0 Answers  


is assignment operator is arithmatic or not

3 Answers   Infosys,


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"); }

1 Answers  


Categories