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 meant by errors and debugging?
How to reverse a string using a recursive function, with swapping?
code for bubble sort?
int i=0,j; j=++i + ++i ++i; printf(" %d",j);
Write a program to swap two numbers without using a temporary variable?
how to count no of words,characters,lines in a paragraph.
Can stdout be forced to print somewhere other than the screen?
What is bubble sort in c?
Write the syntax and purpose of a switch statement in C.
What is period operator in c?
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
Why do we use int main instead of void main in c?