/** Print stats, and terminate Nachos. */
 public static void halt() {
   System.out.print("Machine halting!\n\n");
   stats.print();
   terminate();
 }
  /**
   * Terminate Nachos as the result of an unhandled exception or error.
   *
   * @param e the exception or error.
   */
  public static void terminate(Throwable e) {
    if (e instanceof ThreadDeath) throw (ThreadDeath) e;

    e.printStackTrace();
    terminate();
  }