GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Programming  >  Languages
Next Question 
 Languages  |  Question 1 of 5    Print  
What is Thread ?
(VC++)
What is the difference between Cmutex and Csemaphone?

  
Total Answers and Comments: 5 Last Update: February 11, 2009     Asked by: Ranjith kumar 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
January 11, 2006 07:56:13   #1  
Naveen Rao Member Since: January 2006   Contribution: 2    

RE: What is Thread ?(VC++)What is the diff...
Thread is a light weight process which maintains its own stack and registers but can share the other resources allocated for the process.CMutex and Csemaphore both are used for thread and process synchronisation. CMutex can allow at the most one thread/process to access the resource that also mutually exclusively but Csemaphore can allow the access to the resource to a number of threads/processes simultaneously.
 
Is this answer useful? Yes | No
July 17, 2006 04:54:35   #2  
suresh        

RE: What is Thread ?(VC++)What is the diff...

Hi

Thread is the smallest set of instructions that can be executed..

Cmutex and Csemaphore are the ways used for synchronization purpose.

the difference between the above two is..Cmutex is a single lock where as csemaphore is a multilock..


 
Is this answer useful? Yes | No
August 06, 2006 12:11:16   #3  
Manjunath.D.N.        

RE: What is Thread ?(VC++)What is the diff...
A very good site.
 
Is this answer useful? Yes | No
October 25, 2006 04:34:35   #4  
sivaprasad        

RE: What is Thread ?(VC++)What is the diff...

Hai

Thread: is a path Execution of a program....So that the thread having its own stack and all other resources..

In VC++ we have 4 synchronization Objects.

1)CCriticalSection: This is not aKernal object. using this object you can synchronize one or more threads with in the same process.

2)CMutex

3)CEvent

4)CSemaphore these three are kernal objects

using mutex you can sync two r more threads in the same process or diff process...

i hope u get little bit idea abt these objects

thanks & regards

Sivaprasad


 
Is this answer useful? Yes | No
February 11, 2009 07:16:11   #5  
shameelabdulla Member Since: February 2009   Contribution: 1    

RE: What is Thread ?(VC++)What is the difference between Cmutex and Csemaphone?
Cmutex is the synchronization object to control access of a resource by multiple applications(one thread of each application to access the resource at a time).

CSemaphore is the synchronization object to control access of a resource by multiple threads of a process. CSemaphore allows to specify the number of threads which can process the resource at the same time.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape