What is a mutex and a critical section.Whats difference
between them?How do each of them work?

Answer Posted / achal ubbott

Above answers are correct.now I tell why?
1. Critical Section Object works faster because Critical
section is a user object and is specific to a process.
Where as a Mutex is a kernel object and so many
processes running over the kernel can lock or
unlock/release it. So it is a bit heavier than Critical
Section and thus slow.
2. When control enters the critical section the interrupts
(from various devices like FEC, UART etc. ) to the CPU core
are disabled

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write bites in Turbo c++ Header ("Include") Files.

680


Does c++ support multilevel and multiple inheritances?

546


What are the syntactic rules to be avoid ambiguity in multiple inheritance?

629


What is the basic of c++?

599


Write a program for Divide a number with 2 and Print the output ( NOTE: Check for divide by zero error).

629






What is general format for a prototype?

595


What does ctime() do?

614


What is istream and ostream in c++?

590


What is the fastest c++ compiler?

582


What is an operator function? Describe the function of an operator function?

612


What is friend class in c++ with example?

496


Can constructor be private in c++?

604


Should I learn c++ c?

605


What are references in c++? What is a local reference?

571


Where must the declaration of a friend function appear?

530