The critical-section problem could be solved simply in a
uniprocessor environment if we could forbid Interrupts to occur while a
shared variable is being modified.
Unfortunately, this solution is not feasible in a multiprocessor
environment. Disabling interrupts on a multiprocessor can be time
consuming as the message is passed to all the processors.
The solution to the critical- section problems are overcome
by using a synchronization tool called a semaphore.
A Semaphore is an integer variable that apart from initialization
is accessed only through two standards atomic operation Wait and
Literal meaning of signal is to take semaphore and wait
means release semaphore