Mention some attractive properties of semaphore?
The Semaphores aren't provided by hardware. However they have numerous attractive properties:
- Machine independent.
- It is Simple.
- Powerful exemplify both waiting and exclusion.
- Correctness is simple to determine.
- Work with several processes.
- Can have numerous different critical sections with different semaphores.
- Can acquire lots of resources simultaneously (multiple P's).
- Can allow multiple processes into the critical section at once if that is desirable.
Semaphores are able to be used for things other than simple mutual exclusion. For instance resource allocation P = allocate resource, V = return resource.