← Tech dictionary
Operating systems
What is Semaphore?
A semaphore is an integer variable used to control access to shared resources, changed only by atomic wait (P) and signal (V) operations. A binary semaphore works like a lock (mutex); a counting semaphore allows up to N users.
Learn it properlyOperating systems tutorials — free, with diagrams, quizzes and a certificate