The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: Semaphore
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 04-04-2009
rouilj rouilj is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 2
Thumbs up

I managed to grab a semaphore implementation in ksh originally written by
Ed Schaefer and John Spurgeon for UNIX Review in 2004. The original has dissappeared but my slightly fixed copy is available at:

http://www.cs.umb.edu/~rouilj/#Semaphore

In addition to per user seamphores it also supports a queing mechanism to help prevent starvation.

The only current issue with it is that it works only on a single machine,
I have a plan on how to make it work across multiple machines, but that's not implemented yet.

-- rouilj