/**
 * TestAlgorithm.java
 *
 * This program tests  the three solutions to the critical section problem.
 *
 * @author Greg Gagne, Peter Galvin, Avi Silberschatz
 * @version 1.0 - July 15, 1999
 * Copyright 2000 by Greg Gagne, Peter Galvin, Avi Silberschatz
 * Applied Operating Systems Concepts - John Wiley and Sons, Inc.
 */

public class TestAlgorithm
{
   public static void main(String args[]) {
      /**
       * to test a solution, create an object for Algorithm_1, 
       * Algorithm_2, or Algorithm_3
       */
      MutualExclusion alg = new Algorithm_2();
      
      Worker first = new Worker("Runner 0", 0, alg);
      Worker second = new Worker("Runner 1", 1, alg);
      
      first.start();
      second.start();
   }
}
   

