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
How many keywords are used in c++?
Reads in the size of a square from the screen; 2. Prints a hollow square of that size out of “-“, “|” and blanks on screen; 3. Prints the same hollow square onto a text file. Your program should work for squares of all side sizes between 1 and 20. --- │ │ │ │ │ │ ---
Define the process of handling in case of destructor failure?
Using a smart pointer can we iterate through a container?
Is turbo c++ free?
Which c++ compiler is best?
What is a c++ map?
What is the cout in c++?
Is c++ free?
Explain object slicing in c++?
Can you Mention some Application of C/C++?
Are iterators pointers?
What do you mean by global variables?
What are move semantics?
Explain Memory Allocation in C/C++ ?