3.1 Boot process

The entry point of Nachos is nachos.machine.Machine.main(). Upon calling of this method, Nachos is booted. Similar to a real machine, devices including the interrupt controller, timer, elevator controller, MIPS processor, console, network link are initialized with proper parameters specified by the config file. Unlike real machines, the current implementation does not simulate hard disks. Rather, a file system (e.g., nachos.machine.stubFileSystem) can be optionally initialized during the boot process. The file system reads and writes from a test directory specified in the config file, which actually locates on the hard disk of the system that Nachos runs on.

The Machine object then hands control to the particular AutoGrader in use. The AutoGrader then creates a Nachos kernel, starting the operating system. In the base AutoGrader class, autograder arguments are parsed and the kernel is initialized. To extend the AutoGrader class, one simply override the run() method.

A Nachos kernel is just a subclass of nachos.machine.Kernel. For instance, the thread project uses nachos.threads.ThreadedKernel. UserKernel extends nachos.threads.ThreadedKernel and supports multiple user processes. More details on the Nachos kernel will be discussed in Section 4.