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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you explain the four storage classes in C?

643


How do you convert strings to numbers in C?

710


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

4989


What does dm mean sexually?

814


What do you mean by command line argument?

646






Why we write conio h in c?

567


What is const volatile variable in c?

577


How many levels deep can include files be nested?

652


What does %c mean in c?

651


What is time complexity c?

568


What are the similarities between c and c++?

600


What is spaghetti programming?

670


why do some people write if(0 == x) instead of if(x == 0)?

654


How to create struct variables?

592


Where define directive used?

607