InterviewSolution
| 1. |
Why Do We Require Semaphore? |
|
Answer» For PROCESS synchronization, it is a mechanism to invoke the sleeping process to become ready for EXECUTION. Its mechanism where a process can wait for resources to be available.typical example is producer consumer process. The producer process creates resources and signals the semaphore saying RESOURCE is available. Consumer process waiting on the semaphore GETS the SIGNAL that resource is available. For process synchronization, it is a mechanism to invoke the sleeping process to become ready for execution. Its mechanism where a process can wait for resources to be available.typical example is producer consumer process. The producer process creates resources and signals the semaphore saying resource is available. Consumer process waiting on the semaphore gets the signal that resource is available. |
|