Semaphores
Dijkstra, in the THE system, defined a type of variable and two synchronization operations that can be used to control access to critical sections.
A semaphore is a variable that is manipulated atomically through operations signal(s) and wait(s).
To access a critical section, you must:
wait(s) ;wait until semaphore is available
signal(s) ;signal others to enter