All Packages Class Hierarchy
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
Index of all Fields and Methods
- 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.
- 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)
- 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(String).
Constructor for class CPU
- Initialize the device.
- CPU_SLOT.
Static variable in class Sim
- Slot number for the CPU 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)
- 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(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().
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
- elapsedTime.
Variable in class JobStats
- Total elapsed time from start to end
- 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.
- 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.
- 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?
- Job(BufferedReader).
Constructor for class Job
- Create a Job from a line of the trace file.
- JobArrival(String).
Constructor for class JobArrival
- Initialize the device by opening the trace file.
- JobStats(String, int, int, int).
Constructor for class JobStats
- Create a JobStats object.
- 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
- 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.
- 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.
- ODD_BURST_PROB.
Static variable in class Sim
- Probability of an "unusual" CPU burst.
- 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().
Constructor for class Proj3
-
- 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.
- 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().
Constructor for class RRScheduler
-
- running.
Variable in class Device
- Is the device currently running?
- schedule(Job, Device).
Static method in class Sim
- Utility routine to send a Job to the Disk, CPU, or completion as
appropriate.
- Scheduler().
Constructor for class Scheduler
-
- serial.
Variable in class Job
- Serial number of this job (for debugging)
- 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().
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.
- 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.
- usage.
Static variable in class Proj3
- Usage message
- verbosity.
Static variable in class Sim
- Flag to control the verbosity of debugging output.