Class JobArrival

java.lang.Object
  |
  +--Device
        |
        +--JobArrival

public class JobArrival
extends Device

JobArrival is a phony kind of device that "interrupts" when a new job arrives in the system. It works by reading a trace file that indicates the starting times and resource requirements of jobs that were actually run on a real system.


Constructor Summary
JobArrival(java.lang.String fname)
          Initialize the device by opening the trace file.
 
Method Summary
 void start(Job j, int dummy)
          Read the next (or first) job description from the input file, skipping molformed lines, and make it the current job, with a simulated interrupt occurring at the arrival time of the job.
 
Methods inherited from class Device
current, isBusy, nextInterrupt, printStats, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JobArrival

public JobArrival(java.lang.String fname)
Initialize the device by opening the trace file. The first line is read whenever the device is started.
Parameters:
fname - the name of the trace file.
Method Detail

start

public void start(Job j,
                  int dummy)
Read the next (or first) job description from the input file, skipping molformed lines, and make it the current job, with a simulated interrupt occurring at the arrival time of the job. If no more valid lines appear in the file, schedule an interrupt at time inifinity.
Overrides:
start in class Device
Parameters:
j - dummy argument to conform to the Device interface
dummy - dummy argument to conform to the Device interface
See Also:
Device