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  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories >> Software >> Operating-Systems >> Operating-Systems-General-Concepts
 
 


 

Back to Questions Page
 
Question
which is best among semaphores and mutexes?
Rank Answer Posted By  
 Question Submitted By :: Leossk
This Interview Question Asked @   HP
I also faced this Question!!   © ALL Interview .com
Answer
semaphore.
mutex is a semaphore with count 1
 
0
Scandal
 
 
Question
What are counting semaphores?
Rank Answer Posted By  
 Question Submitted By :: Leossk
This Interview Question Asked @   HP
I also faced this Question!!   © ALL Interview .com
Answer
Counting semaphore -Locks a shared resource against 
simultaneous access by multiple threads 
A counting semaphore is a generalization of a mutex 
semaphore that locks a shared resource against simultaneous 
access by multiple threads. All resource allocation 
functions, such as wait() and post() , take an optional 
parameter defining the number of resources to allocate or 
deallocate.
 
0
Swetcha
 
 
Answer
Counting semaphores are a synchronization primitive that
allow threads to wait until an event has occurred. The event
may be generated by a producer thread, or by a DSR in
response to a hardware interrupt.
 
0
Arshiya
 
 
 
Question
What is the difference between mutex and semaphore?
Rank Answer Posted By  
 Question Submitted By :: Leossk
This Interview Question Asked @   HP
I also faced this Question!!   © ALL Interview .com
Answer
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!
 
0
Swetcha
 
 
Answer
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.
 
0
Drp3
 
 
Answer
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.
 
0
Answers
 
 
Answer
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
 
0
Rabia
 
 
Question
What is the best suited algorithm to avoid internal 
fragmentation?
Rank Answer Posted By  
 Question Submitted By :: Leossk
This Interview Question Asked @   HP
I also faced this Question!!   © ALL Interview .com
Answer
Markov Cluster algorithm
 
0
Swetcha
 
 
Question
What is virtual memory, if OS didt have that concept What 
are the problems can arise?
Rank Answer Posted By  
 Question Submitted By :: Leossk
This Interview Question Asked @   HP
I also faced this Question!!   © ALL Interview .com
Answer
Hi,
Virtual Memory is a concept in which user of a system feels 
to have a large physical memory(Main) that actually does 
not available.
for example U feel unlimited memory(Main) thougn u have 
only in MB's.

If OS did not have this concept then user has to manage the 
memory and in deed can run only a few program at a time.
It means here comes a limit on the efficiency of the system.

byeeeeeeeeeeeeeeeeee.
 
0
Anshul.jain
 
 
Answer
virtual memory is not only used for applications. Latest 
operations works using default virtual memory size 
allocated by the operating system at the time of 
installation. This will depends on total memory we are 
having in you system or server.

The best way is allocation of un-used partition for page 
file purpose.  Be sure no boday is accessing the 
partition.  This will increase system or server performance.

Don't remove pagefile settings this may cause system or 
server crash.


regards,
sivaramakrishna.
 
0
N.v.l.n.sivaramakrishna
 
 
Answer
allows the execution of process that may not be complete in
memory
 
0
Sanjeev Pathak
 
 
Question
How to communicate between difference process?
Rank Answer Posted By  
 Question Submitted By :: Leossk
This Interview Question Asked @   HP , IBM, HP
I also faced this Question!!   © ALL Interview .com
Answer
using port address
 
0
Ishwarya
 
 
Answer
IPCs(Inter Process Communication)like Signals,Message 
queues, Mailbox,Pipes,Named Pipes are used to communicate 
between process.
 
0
Vardhan
 
 
Question
What is Difference between thread and process?
Rank Answer Posted By  
 Question Submitted By :: Leossk
This Interview Question Asked @   HP
I also faced this Question!!   © ALL Interview .com
Answer
The major difference between threads and processes is 
1.Threads share the address space of the process that 
created it; processes have their own address.

2.Threads have direct access to the data segment of its 
process; processes have their own copy of the data segment 
of the parent process. 

3.Threads can directly communicate with other threads of 
its process; processes must use interprocess communication 
to communicate with sibling processes. 

4.Threads have almost no overhead; processes have 
considerable overhead.

5.New threads are easily created; new processes require 
duplication of the parent process.

6.Threads can exercise considerable control over threads of 
the same process; processes can only exercise control over 
child processes. 

7.Changes to the main thread (cancellation, priority 
change, etc.) may affect the behavior of the other threads 
of the process; changes to the parent process does not 
affect child processes. 
 
3
Swetcha
 
 
Answer
Process is a program in execution where as thread is a 
seperate path of execution in a program.
 
4
Janet
 
 
Answer
process is a execution of a program and program contain set 
of instructions but thread is a single sequence stream 
within the process.thread is sometime called lightweight 
process. single thread alows a os to perform singler task 
ata time similarities between process and threads are: 
1)share cpu. 
2)sequential execution 
3)create child 
4)if one thread is blocked then the next will be start to 
run like process. 
dissimilarities: 
1)threads are not independent like process. 
2)all threads can access every address in the task unlike 
process. 
3)threads are design to assist onr another and process 
might or not might be assisted on one another.
 
0
Munshimubbi
 
 
 
Back to Questions Page
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

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