A semaphore (pronounced as sehm uh fawr, invented by Edsger Dijkstra) in computer science is a classic way of protecting shared resources. In multi-programming environments like Unix systems, semaphores are a technique for coordinating or synchronizing activities in which multiple processes compete for the same operating system resources. A process needing the resource checks the semaphore to determine the resource’s status and then decides how to proceed. Depending on the value found, the process can use the resource or will find that it is already in use and must wait for some time before trying again, thus avoiding deadlocks.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: