# RootPrompt.org   Nothing but Unix.[Home] [Features] [Programming] [Mac OS X] [Search]


 Implementing Semaphores in the Shell

"The Init operation initializes the value of a semaphore. When a process needs a resource, the P operation (which comes from the word "proberen" and means "to test" in Dijkstra's native Dutch language) tests the value of the semaphore and decrements the value if a resource is available. When the value of a semaphore is zero, processes attempting to grab a resource must wait until one becomes available. The V operation (from "verhogen", which means "to increment") frees a resource by incrementing the value of the semaphore."
Story

 (Submitted by Noel Wed Jul 28, 2004 )

  


Our content can be syndicated: Main page Mac Page

Copyright 1999-2005 Noel Davis. Noel also runs web sites about sailing and kayaking.
All trademarks are the property of their owners.
All articles are owned by their author