ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage   interview questions urls   External Links  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Operating Systems  >>  Operating Systems General Concepts
 
 


 

 
 Windows interview questions  Windows Interview Questions
 Linux interview questions  Linux Interview Questions
 Unix interview questions  Unix Interview Questions
 Solaris interview questions  Solaris Interview Questions
 RTOS interview questions  RTOS Interview Questions
 Bulnex interview questions  Bulnex Interview Questions
 Operating Systems General Concepts interview questions  Operating Systems General Concepts Interview Questions
 Data Structures interview questions  Data Structures Interview Questions
 Operating Systems AllOther interview questions  Operating Systems AllOther Interview Questions
Question
What is the difference between mutex and semaphore?
 Question Submitted By :: Leossk
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the difference between mutex and semaphore?
Answer
# 1
The only real difference between a Semaphore and a Mutex is 
that a Semaphore can have a count > 1. While a mutex will 
only let one owner attempt access, a Semaphore can be 
assigned a number and allow "x" number of threads access.


..........Let me know if it's wrong!
 
Is This Answer Correct ?    2 Yes 0 No
Swetcha
[Semanticspace]
 
  Re: What is the difference between mutex and semaphore?
Answer
# 2
you are partly right,but you must mention mutex is  binary 
semaphore.
Shemaphores are of two types , binary and counting.counting 
shemaphore can range over an unrestricted domain ,where as 
binary semaphore which is also known as mutex can range 
between 0 and 1.
 
Is This Answer Correct ?    2 Yes 0 No
Drp3
 
 
 
  Re: What is the difference between mutex and semaphore?
Answer
# 3
Mutex: Nothing but a binary semaphore.
Mutex definition says "Mutex can lock any number of times, 
and also it should unlock any number of times"---meaning,
in re-entrant codes if recursive is used.

In this case it will lock number of times and also should 
unlock same number of times.

Semaphore: i think its default-----reeated answers.
 
Is This Answer Correct ?    1 Yes 0 No
Answers
 
  Re: What is the difference between mutex and semaphore?
Answer
# 4
well its true that mutex is a binary semaphore having value 
1 or 0
but mutex also define that when a producer is producing 
something consumer is not allowed to consume at that 
time.........
where as semaphore is the locking mechanism which have non 
negative integers
 
Is This Answer Correct ?    1 Yes 0 No
Rabia
 

 
 
 
Other Operating Systems General Concepts Interview Questions
 
  Question Asked @ Answers
 
What is page cannibalizing?  1
What is the best suited algorithm to avoid internal fragmentation? HP1
unix system is a)multi processing b)multi processing ,multiuser c)multi processing ,multiuser,multitasking d)multiuser,multitasking eInfochips1
what is Loader? Network-Labs1
What is difference between synchronous and asynchronous threads and when can we use them? HP1
What is the difference between mutex and semaphore? HP4
While running DOS on a PC, which command would be used to duplicate the entire diskette?  1
What is time-stamping?  1
what is Demand Paging?  1
What has triggered the need for multitasking in PCs?  1
In a compiler there is 36 bit for a word and to store a character 8bits are needed. IN this to store a character two words are appended .Then for storing a K characters string, How many words are needed. [a] 2k/9 [b] (2k+8)/9 [c] (k+8)/9 [d] 2*(k+8)/9 [e] none Wipro1
when a process is created using fork(). what is shared between parent process and child process. 1.Heap 2. stack 3. shared memory segments 4. I/O handles nvidia1
What has triggered the need for multitasking in PCs?  1
What is Concurrency? Expain with example Deadlock and Starvation? Wipro2
for an application which exceeds 64k the memory model should be a)medium b)huge c)large d)none  1
What are DDks? Name an operating system that includes this feature.  2
List out some reasons for process termination.  2
What are the stipulations of C2 level security?  1
What is interrupt table? HP4
hello, I want a chart which compare all scheduling algorithm performance. I want to know even they act better for I/O bound process or CPU bound process. please guide me how can I recognize the difference of scheduling algorithm? please send me the answer to : moradisomayeh@gmail.com  2
 
For more Operating Systems General Concepts Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com