Class CPU


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. The "current job" is always null.

Constructor Index

 o CPU(String)
Initialize the device.

Method Index

 o start(Job, int)
Start the CPU running a job.


 o CPU
 CPU(String name)
Initialize the device.

name - the name of the device.


 o start
 public void start(Job j,
                   int delay)
Start the CPU running a job.

j - the job to run
delay - the time to run the job (in milliseconds). The actual time until the completion interrupt with be Sim.SWAP_OVERHEAD longer than this.
start in class Device