Class CPU
java.lang.Object
|
+----Device
|
+----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.
-
CPU(String)
- Initialize the device.
-
start(Job, int)
- Start the CPU running a job.
CPU
CPU(String name)
- Initialize the device.
- Parameters:
- name - the name of the device.
start
public void start(Job j,
int delay)
- Start the CPU running a job.
- Parameters:
- 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.
- Overrides:
- start in class Device