nachos.machine
Class Stats

java.lang.Object
  extended by nachos.machine.Stats

public final class Stats
extends Object

An object that maintains Nachos runtime statistics.


Field Summary
static int ConsoleTime
          The amount of simulated time required for the console to handle a character.
static int ElevatorTicks
          The amount of simulated time required for an elevator to move a floor.
static int KernelTick
          The amount to advance simulated time after each interrupt enable.
 long kernelTicks
          The total amount of simulated time that Nachos has spent in kernel mode.
static int NetworkTime
          The amount of simulated time required for the network to handle a packet.
 int numConsoleReads
          The total number of characters Nachos has read from the console.
 int numConsoleWrites
          The total number of characters Nachos has written to the console.
 int numDiskReads
          The total number of sectors Nachos has read from the simulated disk.
 int numDiskWrites
          The total number of sectors Nachos has written to the simulated disk.
 int numPacketsReceived
          The total number of packets Nachos has received from the network.
 int numPacketsSent
          The total number of packets Nachos has sent to the network.
 int numPageFaults
          The total number of page faults that have occurred.
 int numTLBMisses
          The total number of TLB misses that have occurred.
static int RotationTime
          The amount of simulated time required to rotate the disk 360 degrees.
static int SeekTime
          The amount of simulated time required for the disk to seek.
static int TimerTicks
          The mean amount of simulated time between timer interrupts.
 long totalTicks
          The total amount of simulated time that has passed since Nachos started.
static int UserTick
          The amount to advance simulated time after each user instructions is executed.
 long userTicks
          The total amount of simulated time that Nachos has spent in user mode.
 
Constructor Summary
Stats()
          Allocate a new statistics object.
 
Method Summary
 void print()
          Print out the statistics in this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

totalTicks

public long totalTicks
The total amount of simulated time that has passed since Nachos started.


kernelTicks

public long kernelTicks
The total amount of simulated time that Nachos has spent in kernel mode.


userTicks

public long userTicks
The total amount of simulated time that Nachos has spent in user mode.


numDiskReads

public int numDiskReads
The total number of sectors Nachos has read from the simulated disk.


numDiskWrites

public int numDiskWrites
The total number of sectors Nachos has written to the simulated disk.


numConsoleReads

public int numConsoleReads
The total number of characters Nachos has read from the console.


numConsoleWrites

public int numConsoleWrites
The total number of characters Nachos has written to the console.


numPageFaults

public int numPageFaults
The total number of page faults that have occurred.


numTLBMisses

public int numTLBMisses
The total number of TLB misses that have occurred.


numPacketsSent

public int numPacketsSent
The total number of packets Nachos has sent to the network.


numPacketsReceived

public int numPacketsReceived
The total number of packets Nachos has received from the network.


UserTick

public static final int UserTick
The amount to advance simulated time after each user instructions is executed.

See Also:
Constant Field Values

KernelTick

public static final int KernelTick
The amount to advance simulated time after each interrupt enable.

See Also:
Constant Field Values

RotationTime

public static final int RotationTime
The amount of simulated time required to rotate the disk 360 degrees.

See Also:
Constant Field Values

SeekTime

public static final int SeekTime
The amount of simulated time required for the disk to seek.

See Also:
Constant Field Values

ConsoleTime

public static final int ConsoleTime
The amount of simulated time required for the console to handle a character.

See Also:
Constant Field Values

NetworkTime

public static final int NetworkTime
The amount of simulated time required for the network to handle a packet.

See Also:
Constant Field Values

TimerTicks

public static final int TimerTicks
The mean amount of simulated time between timer interrupts.

See Also:
Constant Field Values

ElevatorTicks

public static final int ElevatorTicks
The amount of simulated time required for an elevator to move a floor.

See Also:
Constant Field Values
Constructor Detail

Stats

public Stats()
Allocate a new statistics object.

Method Detail

print

public void print()
Print out the statistics in this object.