Class CPU

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

public class CPU
extends Device

A CPU is a specific kind of Device. It differs from the generic device only in that there is a 1ms delay in starting a process and a 1ms delay in stopping a process.


Constructor Summary
CPU(java.lang.String name)
          Initialize the device.
 
Method Summary
 void start(Job j, int delay)
          Start the CPU running a 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

CPU

public CPU(java.lang.String name)
Initialize the device.
Parameters:
name - the name of the device.
Method Detail

start

public void start(Job j,
                  int delay)
Start the CPU running a job.
Overrides:
start in class Device
Parameters:
j - the job to run
delay - the time to run the job (in milliseconds). The actual time until the completion interrupt with be 2 * Sim.SWAP_OVERHEAD longer than this.