Two uses of semaphores: synchronization and mutual exclusion.
Synchronization: A finishes one thing, B does another thing.
Mutually exclusive: competition for resources.
A process is an abstraction of resources from the operating system, a process: code segment, stack segment, data segment, process control block (PCB).PCB is an important data structure that the operating system perceives the existence of the process.