Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

ThreadedKernel Class Reference

The class implementing threaded kernel. More...

#include <kernel.h>

Inheritance diagram for ThreadedKernel::

UserProgKernel NetKernel List of all members.

Public Methods

 ThreadedKernel (int argc, char **argv)
 Interpret command line arguments. More...

 ~ThreadedKernel ()
 deallocate the kernel. More...

void Initialize ()
 initialize the kernel -- separated from constructor because refers to "kernel" as a global. More...

void Run ()
 do kernel stuff. More...

void SelfTest ()
 test whether kernel is working. More...


Public Attributes

ThreadcurrentThread
 the thread holding the CPU. More...

Schedulerscheduler
 the ready list. More...

Interruptinterrupt
 interrupt status. More...

Statisticsstats
 performance metrics. More...

Alarmalarm
 the software alarm clock. More...


Private Attributes

bool randomSlice
 enable pseudo-random time slicing. More...


Detailed Description

The class implementing threaded kernel.

Definition at line 22 of file kernel.h.


Constructor & Destructor Documentation

ThreadedKernel::ThreadedKernel ( int argc,
char ** argv )
 

Interpret command line arguments.

ThreadedKernel::ThreadedKernel Interpret command line arguments in order to determine flags for the initialization (see also comments in main.cc)

Definition at line 25 of file kernel.cc.

ThreadedKernel::~ThreadedKernel ( )
 

deallocate the kernel.

ThreadedKernel::~ThreadedKernel Nachos is halting. De-allocate global data structures.

Definition at line 71 of file kernel.cc.


Member Function Documentation

void ThreadedKernel::Initialize ( )
 

initialize the kernel -- separated from constructor because refers to "kernel" as a global.

ThreadedKernel::Initialize Initialize Nachos global data structures. Separate from the constructor because some of these refer to earlier initialized data via the "kernel" global variable.

Reimplemented in NetKernel, and UserProgKernel.

Definition at line 50 of file kernel.cc.

Referenced by UserProgKernel::Initialize().

void ThreadedKernel::Run ( )
 

do kernel stuff.

ThreadedKernel::Run Run the Nachos kernel. For now, do nothing. In practice, after initializing data structures, the kernel would start a user program to print the login prompt.

Reimplemented in NetKernel, and UserProgKernel.

Definition at line 89 of file kernel.cc.

Referenced by UserProgKernel::Run().

void ThreadedKernel::SelfTest ( )
 

test whether kernel is working.

ThreadedKernel::SelfTest Test whether this module is working.

Reimplemented in NetKernel, and UserProgKernel.

Definition at line 106 of file kernel.cc.

Referenced by UserProgKernel::SelfTest().


Member Data Documentation

Alarm * ThreadedKernel::alarm
 

the software alarm clock.

Definition at line 45 of file kernel.h.

Thread * ThreadedKernel::currentThread
 

the thread holding the CPU.

Definition at line 41 of file kernel.h.

Interrupt * ThreadedKernel::interrupt
 

interrupt status.

Definition at line 43 of file kernel.h.

bool ThreadedKernel::randomSlice [private]
 

enable pseudo-random time slicing.

Definition at line 48 of file kernel.h.

Scheduler * ThreadedKernel::scheduler
 

the ready list.

Definition at line 42 of file kernel.h.

Statistics * ThreadedKernel::stats
 

performance metrics.

Definition at line 44 of file kernel.h.


The documentation for this class was generated from the following files:
Generated at Wed Jul 4 11:32:24 2001 for Nachos by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001