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 sorting in c plus plus?
Can i use “int” data type to store the value 32768? Why?
What's the difference between struct x1 { ... }; and typedef struct { ... } x2; ?
When is a null pointer used?
If I have a char * variable pointing to the name of a function ..
What are pointers? What are different types of pointers?
what is the difference between #include<stdio.h> and #include"stdio.h" ?
the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none
what is the most appropriate way to write a multi-statement macro?
write a C and C++ programme to implement the A,bubble sort B,quick sort C,insertion sort D,sequential search E,binary search
Write a program that an operator and two operands read from input operand operator on the implementation and results display.
Explain what are the advantages and disadvantages of a heap?