The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
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-07-2003
oombera's Avatar
oombera oombera is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2002
Location: Cleveland, OH
Posts: 804
The way I understand it (someone correct me if this is wrong), when you've got a certain shared resource that, for one reason or another, can only be accessed by one process at a time, you'd use a semaphore.

Basically, the semaphore is a variable that keeps track of all the processes that currently want to access the shared resource and it makes sure only one process at a time actually accesses it.

Read these for more info:

http://www.ecst.csuchico.edu/~beej/g...emaphores.html
http://www.cs.cf.ac.uk/Dave/C/node26.html
http://metalink.oracle.com/cgi-bin/c...e_cr.cgi?20766
http://www.cim.mcgill.ca/~franco/OpS...es/node30.html
http://www.acm.uiuc.edu/lug/presenta...m-5.html#ss5.5