Synchronization allows processors executing multiple
threads of the same or different processes to share data by locking
data structures until the thread requiring the structure has completed.
It is accomplished by using a semaphore variable associated with
each data structure.
The semaphore variable provides a flag to all processors sharing
the data structure. Each processor has access to the semaphore variable,
but it can only manipulate the variable atomically. That is, once
a processor starts a semaphore operation, it must complete it before
any other processor can modify this same data structure.