What is a mutex and a critical section.Whats difference
between them?How do each of them work?
Answer Posted / prasenjit roy
Mutex is a locking object ( like a flag ) for avoiding the
simultaneous use of a common resource. It is also used to
lock the critical section.
Ctitical Section :: is a block of code which should run
atomically ie. there should be no contact switching while
this block executes and once the block starts it should
finish without any interruption.
| Is This Answer Correct ? | 10 Yes | 0 No |
Post New Answer View All Answers
What is a literal in c++?
What is data structure in c++?
What is a pointer with example?
What are the benefits of operator overloading?
Why is it called c++?
Is c++ a pure oop language?
What is input operator in c++?
Why do we use using namespace std in c++?
why is iostream::eof inside a loop condition considered wrong?
How do you declare A pointer to a function which receives nothing and returns nothing
Which is most difficult programming language?
What is the identity function in c++? How is it useful?
what are the iterator and generic algorithms.
What is helper in c++?
What is the full form of ios?