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 |
How do you determine if a string is a palindrome?
How many types of arrays are there in c?
convert 12345 to 54321 withoutusing strig
What does sizeof function do?
Why preprocessor should come before source code?
what is data structure
atoi, which takes a string and converts it to an integer. write a program that reads lines(using getline), converts each line to an integer using atoi and computes the average of all the numbers read. also compute the standard deviation
What is the difference between array and linked list in c?
What is %lu in c?
What are pointers? What are stacks and queues?
How to write a program to receive an integer & find its octal equivalent by using for loop?
Illustrate it summing the series 2+4+6+......to n terms using (i) while loop (ii) do-while loop