nachos.kernel
Class Nachos

java.lang.Object
  extended by nachos.kernel.Nachos
All Implemented Interfaces:
java.lang.Runnable

public class Nachos
extends java.lang.Object
implements java.lang.Runnable

The Nachos main class. Nachos is "booted up" when a Java thread calls the main() method of this class.


Field Summary
private static java.lang.String[] args
          Array containing the command-line arguments passed to main().
private static java.lang.String copyright
           
private static boolean DISK
          Are we going to be using the disk? NOTE: We need the disk if either we are using the "real" Nachos filesystem, or else we are using the disk as backing store for virtual memory.
static DiskDriver diskDriver
          Access to the Nachos disk driver.
private static boolean FILESYS
          Are we going to be using the filesystem?
private static boolean FILESYS_STUB
          Should we use the stub filesystem, rather than the Nachos filesystem? NOTE: if FILESYS is true and this is false, then make sure to set DISK to true.
static FileSystem fileSystem
          Access to the Nachos file system.
private static boolean NETWORK
          Are we going to be using the network?
static NetworkDriver networkDriver
          Access to the Nachos network.
private static boolean THREADS
          Are we going to be using the threads system?
private static boolean USER_PROGRAM
          Are we going to be running user programs?
 
Constructor Summary
Nachos()
           
 
Method Summary
static void main(java.lang.String[] clArgs)
          Bootstrap the operating system kernel.
 void run()
          Nachos initialization -- performed by first Nachos thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

private static final java.lang.String copyright
See Also:
Constant Field Values

USER_PROGRAM

private static final boolean USER_PROGRAM
Are we going to be running user programs?

See Also:
Constant Field Values

DISK

private static final boolean DISK
Are we going to be using the disk? NOTE: We need the disk if either we are using the "real" Nachos filesystem, or else we are using the disk as backing store for virtual memory.

See Also:
Constant Field Values

FILESYS

private static final boolean FILESYS
Are we going to be using the filesystem?

See Also:
Constant Field Values

FILESYS_STUB

private static final boolean FILESYS_STUB
Should we use the stub filesystem, rather than the Nachos filesystem? NOTE: if FILESYS is true and this is false, then make sure to set DISK to true.

See Also:
Constant Field Values

NETWORK

private static final boolean NETWORK
Are we going to be using the network?

See Also:
Constant Field Values

THREADS

private static final boolean THREADS
Are we going to be using the threads system?

See Also:
Constant Field Values

args

private static java.lang.String[] args
Array containing the command-line arguments passed to main().


fileSystem

public static FileSystem fileSystem
Access to the Nachos file system.


diskDriver

public static DiskDriver diskDriver
Access to the Nachos disk driver.


networkDriver

public static NetworkDriver networkDriver
Access to the Nachos network.

Constructor Detail

Nachos

public Nachos()
Method Detail

run

public void run()
Nachos initialization -- performed by first Nachos thread. Initialize various subsystems, depending on configuration. The command line arguments are passed to each of the subsystems so they can scan them for configuration options. Start test programs, if appropriate. Once this method is finished, the first thread terminates. Any activities that are to continue must have their own threads by that point.

Specified by:
run in interface java.lang.Runnable

main

public static void main(java.lang.String[] clArgs)
Bootstrap the operating system kernel.

Parameters:
clArgs - is the array of command line arguments. The various arguments are described in the comments in Nachos.java. Most of the arguments are interpreted by the various subsystems, rather than here.