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 sorting in c plus plus?

0 Answers  


Can i use “int” data type to store the value 32768? Why?

0 Answers  


What's the difference between struct x1 { ... }; and typedef struct { ... } x2; ?

3 Answers  


When is a null pointer used?

0 Answers  


If I have a char * variable pointing to the name of a function ..

0 Answers  






What are pointers? What are different types of pointers?

0 Answers   Fidelity,


what is the difference between #include<stdio.h> and #include"stdio.h" ?

6 Answers   TCS,


the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none

0 Answers  


what is the most appropriate way to write a multi-statement macro?

1 Answers  


write a C and C++ programme to implement the A,bubble sort B,quick sort C,insertion sort D,sequential search E,binary search

1 Answers   ADP, TCS,


Write a program that an operator and two operands read from input operand operator on the implementation and results display.

0 Answers  


Explain what are the advantages and disadvantages of a heap?

0 Answers  


Categories