|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jimweller.cpuscheduler.Process
An aggregate data type to represent a process to schedule. It will maintain all of it's state internally.
Field Summary | |
(package private) boolean |
active
A way to see if a process is scheduled to run this cycle |
(package private) long |
arrival
The actual time the process arrived. |
(package private) boolean |
arrived
a way to check if a process has occured yet |
(package private) long |
burst
Process' CPU burst time. |
(package private) long |
delay
Delay of arrival. |
(package private) long |
finish
The time that the process ends execution. |
(package private) boolean |
finished
A way to see if a process is complete |
(package private) long |
initBurst
Store original burst state. |
(package private) long |
lifetime
Measure of the total time a process was in the clutches of the scheduler. |
(package private) static long |
nextPID
Store the value of the next pid to use. |
(package private) long |
PID
The process' identification number. |
(package private) long |
priority
Execution priority. |
(package private) long |
response
The measure of time after arrival that it took to begin execution |
(package private) long |
start
The time that the process firsts begins execution. |
(package private) boolean |
started
A way to check if a process has started running yet. |
(package private) long |
wait
The total amount of time the process spent waiting. |
Constructor Summary | |
(package private) |
Process()
Default constructor. |
(package private) |
Process(long b,
long d,
long p)
Articulate constructor. |
Method Summary | |
void |
executing(long timeNow)
Go through the motions of running one cycle on a process. |
long |
getArrivalTime()
Get the value of arrival. |
long |
getBurstTime()
Get the value of burst. |
long |
getDelayTime()
Get the value of delay. |
long |
getFinishTime()
Get the value of finish. |
long |
getInitBurstTime()
Get the initial burst value of this process. |
long |
getLifetime()
Get the value of lifetime |
long |
getPID()
Get the value of PID. |
long |
getPriorityWeight()
Get the value of priority. |
long |
getResponseTime()
Get the value of response time. |
long |
getStartTime()
Get the value of start. |
long |
getWaitTime()
Get the value of wait. |
boolean |
isActive()
Get the value of active. |
boolean |
isArrived()
Get the value of arrived. |
boolean |
isFinished()
Get the value of finished. |
boolean |
isStarted()
Get the value of started. |
void |
print()
Show state of process on the terminal |
void |
printCSV()
Print comma seperated values to the terminal |
void |
printCSV(java.io.PrintWriter pw)
Print comma seperated values list to a PrintWriter object. |
void |
println()
Show state on a line. |
void |
restore()
Restores the process to it's original state. |
void |
setArrivalTime(long v)
Set the value of arrival. |
void |
waiting(long timeNow)
The inverse of executing. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
long PID
static long nextPID
long burst
long initBurst
long delay
long priority
long arrival
long start
long finish
long wait
long response
long lifetime
boolean arrived
boolean started
boolean finished
boolean active
Constructor Detail |
Process()
Process(long b, long d, long p)
b
- The burst time of the process.d
- The delay in process arrival mesured from the
arrival of the previous process.p
- The priority weight of the process.Method Detail |
public void executing(long timeNow)
public void waiting(long timeNow)
public void print()
public void println()
public void printCSV()
public void printCSV(java.io.PrintWriter pw)
public long getResponseTime()
public long getWaitTime()
public long getFinishTime()
public long getStartTime()
public long getArrivalTime()
public void setArrivalTime(long v)
v
- Value to assign to arrival.public long getPriorityWeight()
public long getDelayTime()
public long getBurstTime()
public long getInitBurstTime()
public long getPID()
public long getLifetime()
public void restore()
public boolean isActive()
public boolean isFinished()
public boolean isStarted()
public boolean isArrived()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |