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

A

add(Job) - Method in class DiskScheduler
Add a new job wanting service.
add(Job) - Method in class RRScheduler
Add a new job wanting service.
add(Job) - Method in class Scheduler
Add a new job wanting service.
arrivalCount - Static variable in class Sim
The number of job arrivals
ARRIVALS_SLOT - Static variable in class Sim
Slot number for the JobArrivals device.
arrivalTime - Variable in class Job
Arrival time in ms from start of simulation
assert(boolean) - Static method in class Sim
Crude assertion checking.

B

BLOCKED - Static variable in class Job
Job needs to do an I/O operation next
BLOCKSIZE - Static variable in class Sim
The size of a disk block, in bytes
burst - Variable in class Job
size of current burst
burstRemaining - Variable in class Job
amount in current burst (until next I/O op) remaining
burstStart - Variable in class Job
time when current burst started (job "arrived" at the cpu queue)

C

CLOCK_SLOT - Static variable in class Sim
Slot number for the Clock device.
completed - Static variable in class Sim
Information about completed Jobs.
count - Variable in class Stats
The number of values recorded
CPU - class CPU.
A CPU is a specific kind of Device.
CPU_SLOT - Static variable in class Sim
Slot number for the CPU device.
CPU(String) - Constructor for class CPU
Initialize the device.
cpuNeeded - Variable in class Job
Total CPU time (ms) required by this job
cpuRemaining - Variable in class Job
total amount of CPU time (in ms) left to consume
cpuScheduler - Static variable in class Sim
Scheduler for the cpu
cpuUsed - Variable in class JobStats
Total cpu used (in ms)
current() - Method in class Device
Get the current job.
currentJob - Variable in class Device
The current job, if running.
currentTime - Static variable in class Sim
The current simulated time (in ms since start)

D

db(int, Object, Object) - Static method in class Sim
Overloaded version of the debug method.
db(int, Object, Object, Object) - Static method in class Sim
Overloaded version of the debug method.
db(int, Object, Object, Object, Object) - Static method in class Sim
Overloaded version of the debug method.
db(int, Object, Object, Object, Object, Object) - Static method in class Sim
Overloaded version of the debug method.
db(int, Object, Object, Object, Object, Object, int) - Static method in class Sim
Overloaded version of the debug method.
db(int, String) - Static method in class Sim
Print a message if verbosity >= level.
db(String) - Static method in class Sim
Print a message unconditionally.
dev_name - Static variable in class Sim
For debugging: slot names
device - Static variable in class Sim
An array of devices, index by one of the following slot numbers
Device - class Device.
A Device can be running or stopped.
Device(String) - Constructor for class Device
Initialize the Device.
DEVICES - Static variable in class Sim
Number of devices "installed"
DISK_SLOT - Static variable in class Sim
Slot number for the Disk device.
DISK_TIME - Static variable in class Sim
The amount of time it takes for a disk operation
diskScheduler - Static variable in class Sim
Scheduler for the disk
DiskScheduler - class DiskScheduler.
A FCFS scheduler for the disk.
DiskScheduler() - Constructor for class DiskScheduler
 
doIO() - Method in class Job
Called when this Job does an I/O operation
DONE - Static variable in class Job
Job has completed

E

elapsedTime - Variable in class JobStats
Total elapsed time from start to end

F

fileName - Variable in class JobArrival
The name of the trace file
finish() - Method in class Job
This job is finished.
firstInterrupt() - Static method in class Sim
Query the devices to see which one will be the first to interrupt.

H

head - Variable in class DiskScheduler
The head of a queue of jobs awaiting service.
head - Variable in class RRScheduler
The head of a queue of jobs awaiting service.

I

ioNeeded - Variable in class Job
Total number of I/O operations required by this job
ioRemaining - Variable in class Job
number of I/O operations left to do
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
Create 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(String, int, int, int) - Constructor for class JobStats
Create a JobStats object.

L

lastChanged - Variable in class Scheduler
The last time the queue length changed
lastSerial - Static variable in class Job
Counter used for assigning serial numbers to Jobs (for debugging output).
lastStart - Variable in class Job
time when this Jobs last started using the CPU
lenSum - Variable in class Scheduler
The time integral of queue length

M

main(String[]) - Static method in class Proj3
Main program.
mainLoop(String) - Static method in class Sim
This is the main program that runs the simulation.
max - Variable in class Stats
The maximum value recorded
maxLen - Variable in class Scheduler
The maximum queue length
MAXQUEUE - Static variable in class Scheduler
The max queue length we tally in the histogram
min - Variable in class Stats
The minimum value recorded
moreVerbose() - Static method in class Sim
Increase the verbosity.

N

name - Variable in class Device
The name of the device (for diagnostic output)
name - Variable in class Job
Name of this job (for debugging)
name - Variable in class JobStats
Name of the job
newBurst() - Method in class Job
Recaculate the amount of CPU to be used by this job before the next I/O operation: the amount of cpu time remaining divided by the number of I/O operations remaining, rounded up.
next - Variable in class Job
Link for linking into queues
nextBurst() - Method in class Job
Return the amount of CPU time remaining for this job until it next does I/O, or completes.
nextInterrupt() - Method in class Device
Retrieve the time when the next interrupt will occur.
nextInterruptTime - Variable in class Device
When will it next interrupt? (MAX_VALUE if not running)
now() - Static method in class Sim
Get the current time.

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)
pr(String) - 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.
Proj3 - class Proj3.
Main program for project 3 (CPU scheduling).
Proj3() - Constructor for class Proj3
 

Q

qlen - Variable in class Scheduler
The current queue length
QUANTUM - Static variable in class Sim
The quantum for round-robin scheduling
queueChanged(int) - Method in class Scheduler
This method should be called by a subclass whenever the queue length changes.
queueHist - Variable in class Scheduler
The amount of time the queue had a given length
queueString() - Method in class RRScheduler
For debugging.

R

rand - Variable in class Job
random number generator used by newBurst
READY - Static variable in class Job
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 just after a job changes state.
reschedule(Job) - Method in class Scheduler
This method is called when there is a clock interrupt, and just after a job changes state.
RRScheduler - class RRScheduler.
A round-robin Scheduler for a CPU.
RRScheduler() - Constructor for class RRScheduler
 
running - Variable in class Device
Is the device currently running?

S

schedule(Job, Device) - Static method in class Sim
Utility routine to send a Job to the Disk, CPU, or completion as appropriate.
Scheduler - class Scheduler.
A Scheduler schedules jobs seeking service from a Device.
Scheduler() - Constructor for class Scheduler
 
serial - Variable in class Job
Serial number of this job (for debugging)
Sim - class Sim.
Class Sim is the main driver for the whole simulation.
Sim() - Constructor for class Sim
 
start() - Method in class Job
Called when this Job is started running on the CPU
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.
startedAt - Variable in class Device
When did it last start running? (meaningless if not running)
state() - Method in class Job
What is 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.
stop() - Method in class Job
Called when this Job is removed from the CPU
sum - Variable in class Stats
The sum of the values
SWAP_OVERHEAD - Static variable in class Sim
Penalty for starting and stopping a process.

T

tail - Variable in class DiskScheduler
 
tail - Variable in class RRScheduler
 
tod(int) - Static method in class Sim
Convert 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 device.
toString() - Method in class JobStats
Convert to string.
toString() - Method in class Stats
Report statistics about the values recorded.
totalTime - Variable in class Device
What is the total amount of time it has been running?
trace - Variable in class Device
Trace of significant events in this device's lifetime (only if Sim.traceFlag)
trace - Variable in class Job
Trace of significant events in this job's lifetime (only if Sim.traceFlag)
traceFile - Variable in class JobArrival
The trace file itself
traceFlag - Static variable in class Sim
Trace flag.

U

usage - Static variable in class Proj3
Usage message

V

verbosity - Static variable in class Sim
Flag to control the verbosity of debugging output.

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