What is semaphone?

Answer Posted / vinoth

We all know it is an IPC and it is mainly required to have Synchronization of shared memory access among different threads or process.

hmmm .... even mutex does the same thing... They too synchronize the access of the shared memory... then what is the difference..??

semaphore allows n number of users to access the same resources. we go for semaphore only when the resource that can handle some n process/threads at the same time.


Mutex is a semphore with a value 1.


Only one user can access the shared resources at a given time for mutex.

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is unix ipc?

551


Explain what is the process id for kernel process?

576


Explain what are the system calls used for process management?

512


What are the various schemes available?

543


How to get or set an environment variable from a program?

539






What are the various schemes available in ipc?

549


Tell me set-user-id is related to (in unix)?

547


Explain linking across directories?

533


What is i-node numbers?

592


Max relax-able permission value with out giving write permission to others?

566


Please describe the initial process sequence while the system boots up?

573


Explain the system calls used for process management?

542


How to write the program on full-duplex communication on bidirectional(e.g using two pipes)?

585


Explain the advantage of executing a process in background?

508


What is the condition required for dead lock in unix system?

548