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 are guid?
Can manipulators fall in love?
Explain the isa and hasa class relationships. How would you implement each?
How many types of comments are there in c++?
What is null pointer and void pointer and what is their use?
How would you obtain segment and offset addresses from a far address of a memory location?
What is runtime errors c++?
Why do we use vector in c++?
Can we inherit constructor in c++?
How do you write a function that can reverse a linked-list?
Where is atoi defined?
What is an inline function in c++?
What is polymorphism in c++? Explain with an example?
What are the two types of comments?
What is the difference between reference and pointer?