Class SharedDataMain

java.lang.Object
  |
  +--SharedDataMain

public abstract class SharedDataMain
extends java.lang.Object

Class SharedDataMain defines a main method for running a readers and writers simulation.


Field Summary
static double ACCESS_TIME
          ACCESS_TIME is the read and write access time for a SharedData object.
static double LOAD_FACTOR
          LOAD_FACTOR is the fraction of time that is spent for accesses.
static int NUM_READERS
          NUM_READERS is the number of readers used in the simulation.
static int NUM_WRITERS
          NUM_WRITERS is the number of writers used in the simulation.
static double READ_LOAD
          READ_LOAD is the fraction of total access time that is spent for Reader accesses.
static double READ_TWIDDLE
          READ_TWIDDLE is the average time that readers spend between reads.
static long SIMULATION_TIME
          SIMULATION_TIME is the approximate total time for the simulation.
static double WRITE_LOAD
          WRITE_LOAD is the fraction of total access time that is spent for Reader accesses.
static double WRITE_TWIDDLE
          WRITE_TWIDDLE is the average time that writers spend between writes.
 
Method Summary
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIMULATION_TIME

public static final long SIMULATION_TIME
SIMULATION_TIME is the approximate total time for the simulation.

LOAD_FACTOR

public static final double LOAD_FACTOR
LOAD_FACTOR is the fraction of time that is spent for accesses. This number must be positive. It is usually less than 1.0

ACCESS_TIME

public static final double ACCESS_TIME
ACCESS_TIME is the read and write access time for a SharedData object. This constant must be positive.

NUM_READERS

public static final int NUM_READERS
NUM_READERS is the number of readers used in the simulation. This number must be a positive integer.

NUM_WRITERS

public static final int NUM_WRITERS
NUM_WRITERS is the number of writers used in the simulation. This number must be a positive integer.

READ_LOAD

public static final double READ_LOAD
READ_LOAD is the fraction of total access time that is spent for Reader accesses. This number must be positive and less than 1.0.

WRITE_LOAD

public static final double WRITE_LOAD
WRITE_LOAD is the fraction of total access time that is spent for Reader accesses. This constant should not be modified.

READ_TWIDDLE

public static final double READ_TWIDDLE
READ_TWIDDLE is the average time that readers spend between reads. This constant should not be modified.

WRITE_TWIDDLE

public static final double WRITE_TWIDDLE
WRITE_TWIDDLE is the average time that writers spend between writes. This constant should not be modified.
Method Detail

main

public static void main(java.lang.String[] args)