Mutex and Critical Section are used for synchronization.Both are almost same except that Critical Section is used within a same process area, where mutex is used in different process area. I will explain you with simple example: Suppose in your project, You are using one array and two threads are running simultaneously. First thread add data in an array and other display that data on screen. Scenario 1: Without Critical section There is a schedular program in OS that give time slot to every process and threads that are running. It is so frequently done that we feel that all threads are running simultaneous.Suppose time slot given to both thread is equal. If thread one is running it can add only 40 data and than time slot is given to other thread and it display 50 data. Now for some data some garbage data is displayed. If threads uses the same resourse and we must synchronize the thread. In this case we use CS.Process area of both the thread is same, So it is fast. Scenario 2: Suppose we use printer machine to print some data. If two person request at a time and if no synchronization process is used than it gives to garbage data. At this time one process have to wait to complete the process of second. This time the process or thread are from different process area. So we use mutexes. The process area of process is different, So it is slow. I think this example will clear your doubt. :)
"Every Little Smile can touch Somebody's Heart... May we find Hundreds of Reasons to Smile Everyday... and May WE be the Reason for someone else to smile always!" (ICAN) "Your thoughts are the architects of your destiny."