Interview
    C#
    VB.Net
    VC++
    ASP.Net
    ADO.Net
    .Net Framework
    Silverlight
    WPF(Windows Presentation Foundation)/XAML
    WCF(Windows Communication Foundation)
    Java
    PHP
    AJAX
    Assembly
    XML
    Wireless/Mobile Development
    Cold Fusion
    MSSQL Server 2000/2005/2008/2012
    MYSQL
    DB2
    MS Access
    Java Script
    VB Script
    JQuery
    Testing
    BlackBox Testing
    WhiteBox Testing
    OOPS
    SharePoint
    ASP.NET MVC
    HTML5
    CSS/CSS3
    IIS 7
    Windows 8
    Google API
    Facebook API
    Twitter API
    Android Programming
    iPhone/iPad Programming
    Windows Phone Programming
    Json
Follow Us
Follow _MindStick_ on Twitter View MindStick Software's LinkedIn profile View MindStick Software's Facebook profile
Advertisement
Advertise with Us
Mindstick
Article Article  Forum Forum  Blog Blog  Quiz Quiz  Beginner Beginner  Careers Careers  Contact Contact  Login Login  
Home | Product | Services | About Us | Interview | DeveloperSection | Submit Question | Search 
Report Abuse Form
Reason:    
 
Interview
Home >> VC++ >> Difference between critical section, mutex and semaphore%3...

Difference between critical section, mutex and semaphore?

Posted By Arun Singh on 8/17/2012
Views: 823
Major Category: .Net
Sub Category: VC++
Total Answer 1
User Information Answer
• Arun Singh
Posted Date 8/17/2012
A critical section in which the process may be changing common variables, updating table, writing a file and perform another function. The important problem is that if one process is executing in its critical section, no other process is to be allowed to execute in its critical section. Each process much request permission to enter its critical section.

A semaphore is a tool for synchronization and it is used to remove the critical section problem which is that no two processes can run simultaneously together so to remove this two signal operations are used named as wait and signal which is used to remove the mutual exclusion of the critical section. as an unsigned one of the most important synchronization primitives, because you can build many other Decrementing the semaphore is called acquiring or locking it, incrementing is called releasing or unlocking.

A mutex is a special case of the semaphore and also known as binary mutex it can have only two values minimum of 0 and maximum of 1, meaning it can be either locked or unlocked. It is used to prevent more than one thread from accessing the same data while allowing multiple threads to run on it.

Report Abuse

Report Abuse Form
Reason:    
 
Total Online Users: 2848
Advertisement
MindStick SurveyManager
Advertise with Us
  
Copyright © 2009 - 2013MindStick. All Rights Reserved.