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 meant by errors and debugging?

0 Answers  


How to reverse a string using a recursive function, with swapping?

5 Answers  


code for bubble sort?

1 Answers  


int i=0,j; j=++i + ++i ++i; printf(" %d",j);

2 Answers   ME,


Write a program to swap two numbers without using a temporary variable?

0 Answers   Infosys,






how to count no of words,characters,lines in a paragraph.

0 Answers  


Can stdout be forced to print somewhere other than the screen?

0 Answers  


What is bubble sort in c?

0 Answers  


Write the syntax and purpose of a switch statement in C.

0 Answers   Adobe,


What is period operator in c?

3 Answers   Wipro,


how can i make a program with this kind of output.. Enter a number: 5 0 01 012 0123 01234 012345 01234 0123 012 01 0

4 Answers   Wipro,


Why do we use int main instead of void main in c?

0 Answers  


Categories