nachos.threads
Class ThreadedKernel

java.lang.Object
  |
  +--nachos.machine.Kernel
        |
        +--nachos.threads.ThreadedKernel
Direct Known Subclasses:
UserKernel

public class ThreadedKernel
extends Kernel

A multi-threaded OS kernel.


Field Summary
static Alarm alarm
          Globally accessible reference to the alarm.
static FileSystem fileSystem
          Globally accessible reference to the file system.
static Scheduler scheduler
          Globally accessible reference to the scheduler.
 
Fields inherited from class nachos.machine.Kernel
kernel
 
Constructor Summary
ThreadedKernel()
          Allocate a new multi-threaded kernel.
 
Method Summary
 void initialize(String[] args)
          Initialize this kernel.
 void run()
          A threaded kernel does not run user programs, so this method does nothing.
 void selfTest()
          Test this kernel.
 void terminate()
          Terminate this kernel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scheduler

public static Scheduler scheduler
Globally accessible reference to the scheduler.

alarm

public static Alarm alarm
Globally accessible reference to the alarm.

fileSystem

public static FileSystem fileSystem
Globally accessible reference to the file system.
Constructor Detail

ThreadedKernel

public ThreadedKernel()
Allocate a new multi-threaded kernel.
Method Detail

initialize

public void initialize(String[] args)
Initialize this kernel. Creates a scheduler, the first thread, and an alarm, and enables interrupts. Creates a file system if necessary.
Overrides:
initialize in class Kernel

selfTest

public void selfTest()
Test this kernel. Test the KThread, Semaphore, SynchList, and ElevatorBank classes. Note that the autograder never calls this method, so it is safe to put additional tests here.
Overrides:
selfTest in class Kernel

run

public void run()
A threaded kernel does not run user programs, so this method does nothing.
Overrides:
run in class Kernel

terminate

public void terminate()
Terminate this kernel. Never returns.
Overrides:
terminate in class Kernel