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 > 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 -->
  #4 (permalink)  
Old 04-07-2003
Neo's Avatar
Neo Neo is online now Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 6,692
A semaphore is a flag used to insure than events are atomic. . Just like a railroad semaphore, the flag provides a signal to one train if another is approaching, helping the conductors of the train avoid a train wreck.

The same is true for software processes that share memory, files, or other software artifacts. A semaphore is used in interprocess communications to insure that there are no 'train wrecks' between software processes.