Class Sim

java.lang.Object
   |
   +----Sim

public class Sim
extends Object

Variable Index

 o BLOCKSIZE
The size of a disk block, in bytes
 o CPU_RR
Types of CPU scheduler
 o CPU_XQ1
 o CPU_XQ2
 o DISK_TIME
The amount of time it takes for a disk operation
 o ODD_BURST_PROB
Probability of an "unusual" CPU burst (see Job.newBurst())
 o QUANTUM
The quantum for round-robin scheduling
 o SWAP_OVERHEAD
Penalty for starting and stopping a process.
 o traceFlag
Trace flag:
 o verbosity
Flag to control the verbosity of debugging output.

Constructor Index

 o Sim()

Method Index

 o assert(boolean)
Crude assertion checking
 o db(int, Object, Object)
 o db(int, Object, Object, Object)
 o db(int, Object, Object, Object, Object)
 o db(int, Object, Object, Object, Object, Object)
 o db(int, Object, Object, Object, Object, Object, int)
 o db(int, String)
Print msg if verbosity >= level
 o db(String)
Print msg unconditionally
 o moreVerbose()
 o now()
 o pl(String)
Print msg unconditionally without the header
 o 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.

Variables

 o DISK_TIME
 public static final int DISK_TIME
The amount of time it takes for a disk operation

 o QUANTUM
 public static int QUANTUM
The quantum for round-robin scheduling

 o BLOCKSIZE
 public static final int BLOCKSIZE
The size of a disk block, in bytes

 o SWAP_OVERHEAD
 public static final int SWAP_OVERHEAD
Penalty for starting and stopping a process.

 o ODD_BURST_PROB
 public static final double ODD_BURST_PROB
Probability of an "unusual" CPU burst (see Job.newBurst())

 o CPU_RR
 public static final int CPU_RR
Types of CPU scheduler

 o CPU_XQ1
 public static final int CPU_XQ1
 o CPU_XQ2
 public static final int CPU_XQ2
 o verbosity
 public static int verbosity
Flag to control the verbosity of debugging output.

 o traceFlag
 public static boolean traceFlag
Trace flag:

Constructors

 o Sim
 public Sim()

Methods

 o now
 public static int now()
 o moreVerbose
 public static void moreVerbose()
 o db
 public static void db(int level,
                       String msg)
Print msg if verbosity >= level

 o db
 public static void db(int level,
                       Object o1,
                       Object o2)
 o db
 public static void db(int level,
                       Object o1,
                       Object o2,
                       Object o3)
 o db
 public static void db(int level,
                       Object o1,
                       Object o2,
                       Object o3,
                       Object o4)
 o db
 public static void db(int level,
                       Object o1,
                       Object o2,
                       Object o3,
                       Object o4,
                       Object o5)
 o db
 public static void db(int level,
                       Object o1,
                       Object o2,
                       Object o3,
                       Object o4,
                       Object o5,
                       int o6)
 o db
 public static void db(String msg)
Print msg unconditionally

 o pl
 public static void pl(String msg)
Print msg unconditionally without the header

 o assert
 public static void assert(boolean condition)
Crude assertion checking

 o 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!