A B C D E F G I J M N O P Q R S T U

A

add(Job, Job) - Method in class DiskScheduler
Add a new job wanting service.
add(Job, Job) - Method in class RRScheduler
Add a new job wanting service.
add(Job, Job) - Method in class Scheduler
A new job has just requested service for the device.
arrivalTime() - Method in class Job
Indicates when this Job first arrived in the system.

B

baseQuantum - Variable in class Scheduler
A baseline quantum to be used by schedulers that require it.
BLOCKED - Static variable in class Job
State value indicating that the Job needs to do an I/O operation next
BLOCKSIZE - Static variable in class Sim
The size of a disk block, in bytes
burstRemaining() - Method in class Job
Returns the amount of CPU time remaining for this job until it next blocks for I/O or completes.
burstStart - Variable in class Job
Time when current burst started (job "arrived" at the cpu queue)
burstUsed() - Method in class Job
Indicates the amount of CPU time has this job used since the start of the burst (not including overhead).

C

CPU - class CPU.
A CPU is a specific kind of Device.
CPU(String) - Constructor for class CPU
Initialize the device.
cpuUsed - Variable in class JobStats
Total cpu used (in ms)
current() - Method in class Device
Get the current job.
currentBurst() - Method in class Job
Indicates the total length of the current burst.

D

debug(String) - Static method in class Sim
Print a message unconditionally.
debugLevel() - Static method in class Sim
Return the current level of debugging.
Device - class Device.
A Device can be running or stopped.
Device(String) - Constructor for class Device
Initialize the Device.
DISK_TIME - Static variable in class Sim
The amount of time it takes for a disk operation
DiskScheduler - class DiskScheduler.
A FCFS scheduler for the disk.
DiskScheduler() - Constructor for class DiskScheduler
 
doIO() - Method in class Job
Called by the simulator when this Job does an I/O operation
DONE - Static variable in class Job
State value indicating that the Job has completed

E

elapsedTime - Variable in class JobStats
Total elapsed time from start to end
endBurst(Job) - Method in class Scheduler
This method is called when a job finishes a burst.

F

finish() - Method in class Job
This job is finished.

G

getBaseQuantum() - Method in class Scheduler
Retrieve the value of the base quantum
getQuantum(Job) - Method in class Scheduler
Get the value of the quantum for a specific job.

I

ioUsed - Variable in class JobStats
Total I/O operations
isBusy() - Method in class Device
Is the device currently runing?

J

Job - class Job.
A Job represents one customer of services.
Job(BufferedReader) - Constructor for class Job
Creates a Job from a line of the trace file.
JobArrival - class JobArrival.
JobArrival is a phony kind of device that "interrupts" when a new job arrives in the system.
JobArrival(String) - Constructor for class JobArrival
Initialize the device by opening the trace file.
JobStats - class JobStats.
A JobStats object is used to record statistics about a Job that has completed.
JobStats(int, int, int, int) - Constructor for class JobStats
Create a JobStats object.

M

main(String[]) - Static method in class Project2
Main program.
mainLoop(String, String, int) - Static method in class Sim
This is the main program that runs the simulation.
moreVerbose() - Static method in class Sim
Increase the verbosity of debugging.

N

nextInterrupt() - Method in class Device
Retrieve the time when the next interrupt will occur.
now() - Static method in class Sim
Get the current time, in simulated milliseconds since startup.

O

ODD_BURST_PROB - Static variable in class Sim
Probability of an "unusual" CPU burst.

P

penalty - Variable in class JobStats
Penalty ratio (elapsed over sum of I/O time and CPU time)
pl(Object) - Static method in class Sim
Print a message unconditionally without a header.
printQueue() - Method in class DiskScheduler
For debugging: print the queue of waiting jobs
printQueue() - Method in class RRScheduler
For debugging: print the queue of waiting jobs
printQueue() - Method in class Scheduler
For debugging: print the queue of waiting jobs
printStats() - Method in class Device
Print information about this device
printStats() - Method in class Scheduler
Print statistics about the history of this queue.
Project2 - class Project2.
Main program for project 3 (CPU scheduling).
Project2() - Constructor for class Project2
 

Q

queueChanged(int) - Method in class Scheduler
This method should be called by a subclass whenever the queue length changes.

R

READY - Static variable in class Job
State value indicating that the Job is ready to run
record(double) - Method in class Stats
Record another value.
remove() - Method in class DiskScheduler
Retrieve (and remove) the next job to be served.
remove() - Method in class RRScheduler
Retrieve (and remove) the next job to be served.
remove() - Method in class Scheduler
Retrieve (and remove) the next job to be served.
reschedule(Job) - Method in class DiskScheduler
This method is called when there is a clock interrupt, and just after a job changes state.
reschedule(Job) - Method in class RRScheduler
This method is called when there is a clock interrupt and decides whether to preempt the current job.
reschedule(Job) - Method in class Scheduler
This method is called when there is a clock interrupt.
RRScheduler - class RRScheduler.
A round-robin Scheduler for a CPU.
RRScheduler() - Constructor for class RRScheduler
 

S

Scheduler - class Scheduler.
A Scheduler schedules jobs seeking service from a Device.
Scheduler() - Constructor for class Scheduler
 
schedulerInfo - Variable in class Job
A place for the scheduler to store arbitrary info about this Job.
setBaseQuantum(int) - Method in class Scheduler
Method to set the value of the baseQuantum
Sim - class Sim.
Class Sim is the main driver for the whole simulation.
Sim() - Constructor for class Sim
 
start(Job, int) - Method in class CPU
Start the CPU running a job.
start(Job, int) - Method in class Device
Start a device running, servicing a job.
start(Job, int) - Method in class JobArrival
Read the next (or first) job description from the input file, skipping molformed lines, and make it the current job, with a simulated interrupt occurring at the arrival time of the job.
startJob() - Method in class Job
Called by the simulator when this Job is started running on the CPU
state() - Method in class Job
Indicates the current state of this Job.
Stats - class Stats.
A Stats object accumulates statistics about a serious of values.
Stats() - Constructor for class Stats
 
stop() - Method in class Device
Stop the device.
stopJob() - Method in class Job
Called by the simulator when this Job is removed from the CPU
SWAP_OVERHEAD - Static variable in class Sim
Penalty for starting or stopping a process.

T

tod(int) - Static method in class Sim
Converts a time-stamp from ms to time of day in the format h:mm:ss.mmm This used to be written more "cleanly", but it turned out to consume a huge fraction of the entire time taken by the program, so it was re-written to avoid allocating and concatenating Strings until the very end.
toString() - Method in class Device
For debugging, information about this device.
toString() - Method in class Job
For debugging, information about this Job.
toString() - Method in class JobStats
Convert to string.
toString() - Method in class RRScheduler
For debugging: a concise version of the queue
toString() - Method in class Stats
Report statistics about the values recorded.
traceFlag - Static variable in class Sim
Trace flag.
tracing() - Static method in class Sim
Indicate whether all events should be traced.

U

updateRemaining() - Method in class Job
Called when an accurate value of the remaining time for this job is needed.

A B C D E F G I J M N O P Q R S T U