Class Sim
java.lang.Object
|
+----Sim
- public class Sim
- extends Object
-
BLOCKSIZE
- The size of a disk block, in bytes
-
CPU_RR
- Types of CPU scheduler
-
CPU_XQ1
-
-
CPU_XQ2
-
-
DISK_TIME
- The amount of time it takes for a disk operation
-
ODD_BURST_PROB
- Probability of an "unusual" CPU burst (see Job.newBurst())
-
QUANTUM
- The quantum for round-robin scheduling
-
SWAP_OVERHEAD
- Penalty for starting and stopping a process.
-
traceFlag
- Trace flag:
-
verbosity
- Flag to control the verbosity of debugging output.
-
Sim()
-
-
assert(boolean)
- Crude assertion checking
-
db(int, Object, Object)
-
-
db(int, Object, Object, Object)
-
-
db(int, Object, Object, Object, Object)
-
-
db(int, Object, Object, Object, Object, Object)
-
-
db(int, Object, Object, Object, Object, Object, int)
-
-
db(int, String)
- Print msg if verbosity >= level
-
db(String)
- Print msg unconditionally
-
moreVerbose()
-
-
now()
-
-
pl(String)
- Print msg unconditionally without the header
-
tod(int)
- 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.
DISK_TIME
public static final int DISK_TIME
- The amount of time it takes for a disk operation
QUANTUM
public static int QUANTUM
- The quantum for round-robin scheduling
BLOCKSIZE
public static final int BLOCKSIZE
- The size of a disk block, in bytes
SWAP_OVERHEAD
public static final int SWAP_OVERHEAD
- Penalty for starting and stopping a process.
ODD_BURST_PROB
public static final double ODD_BURST_PROB
- Probability of an "unusual" CPU burst (see Job.newBurst())
CPU_RR
public static final int CPU_RR
- Types of CPU scheduler
CPU_XQ1
public static final int CPU_XQ1
CPU_XQ2
public static final int CPU_XQ2
verbosity
public static int verbosity
- Flag to control the verbosity of debugging output.
traceFlag
public static boolean traceFlag
- Trace flag:
Sim
public Sim()
now
public static int now()
moreVerbose
public static void moreVerbose()
db
public static void db(int level,
String msg)
- Print msg if verbosity >= level
db
public static void db(int level,
Object o1,
Object o2)
db
public static void db(int level,
Object o1,
Object o2,
Object o3)
db
public static void db(int level,
Object o1,
Object o2,
Object o3,
Object o4)
db
public static void db(int level,
Object o1,
Object o2,
Object o3,
Object o4,
Object o5)
db
public static void db(int level,
Object o1,
Object o2,
Object o3,
Object o4,
Object o5,
int o6)
db
public static void db(String msg)
- Print msg unconditionally
pl
public static void pl(String msg)
- Print msg unconditionally without the header
assert
public static void assert(boolean condition)
- Crude assertion checking
tod
public static String tod(int time)
- 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.
Too bad Java doesn't have sprintf!