CS 460 Operating Systems


Semaphore Example Source codes


Put the following files in the same directory and compile them with the command javac *.java. You can run the sempaphore example by java FirstSemaphore.

  • Semaphore.java
  • Worker.java
  • FirstSemaphore.java
  • Runner.java