Disadvantage and Advantage of mutual-exclusion implementation with semaphores.
Disadvantage: Mutual-exclusion solutions specified by semaphores require busy waiting.
That is, even as a process is in its critical section, any other process which tries to enter its critical section should loop continuously in the entry code. Therefore, busy waiting wastes CPU cycles that several other process might capable to use productively.
Advantage: This kind of semaphore is also termed as spinlock as the process "spins" while waiting for lock. Spinlocks are helpful in multiprocessor systems as no context switch is needed when a process should wait on a lock. Therefore, when locks are expected to be held for short times, spinlocks are helpful.