Trần Thu Hằng
Member
Why Semaphore is used in OS?
Answer
Semaphore is simply a variable that is non-negative and shared between threads. This variable is used
to solve the critical section problem and to achieve process synchronization in the multiprocessing environment
. This is also known as mutex lock. It can have only two values – 0 and 1.
Answer
Semaphore is simply a variable that is non-negative and shared between threads. This variable is used
to solve the critical section problem and to achieve process synchronization in the multiprocessing environment
. This is also known as mutex lock. It can have only two values – 0 and 1.