Class Job

java.lang.Object
   |
   +----Job

public class Job
extends Object

Variable Index

o BLOCKED
Job needs to do an I/O operation next
o burst
size of current burst
o burstStart
time when current burst started (job "arrived" at the cpu queue)
o DONE
Job has completed
o READY
Job is ready to run

Method Index

o doIO()
Called when this Job does an I/O operation
o finish()
This job is finished.
o nextBurst()
Return the amount of CPU time remaining for this job until it next does I/O, or completes.
o start()
Called when this Job is started running on the CPU
o state()
What is the current state of this Job?
o stop()
Called when this Job is removed from the CPU
o toString()
for debugging: a string version of this job

Variables

oburst
 public int burst
size of current burst

 

 

oburstStart
 public int burstStart
time when current burst started (job "arrived" at the cpu queue)

 

 

oDONE
 public static final int DONE
Job has completed

 

 

oBLOCKED
 public static final int BLOCKED
Job needs to do an I/O operation next

 

 

oREADY
 public static final int READY
Job is ready to run

 

 

Methods

otoString
 public String toString()
for debugging: a string version of this job
Overrides:
toString in class Object
ostate
 public int state()
What is the current state of this Job?

 

 

ostart
 public void start()
Called when this Job is started running on the CPU

 

 

ostop
 public void stop()
Called when this Job is removed from the CPU

 

 

onextBurst
 public int nextBurst()
Return the amount of CPU time remaining for this job until it next does I/O, or completes.

 

 

odoIO
 public void doIO()
Called when this Job does an I/O operation

 

 

ofinish
 public JobStats finish()
This job is finished. Return some summary statistics