hw4 test
This commit is contained in:
@@ -25,31 +25,34 @@ class SynchConsoleInput;
|
||||
class SynchConsoleOutput;
|
||||
class SynchDisk;
|
||||
|
||||
|
||||
// Todo ----
|
||||
// ---------
|
||||
|
||||
class Kernel {
|
||||
public:
|
||||
Kernel(int argc, char **argv);
|
||||
// Interpret command line arguments
|
||||
// Interpret command line arguments
|
||||
~Kernel(); // deallocate the kernel
|
||||
|
||||
|
||||
void Initialize(); // initialize the kernel -- separated
|
||||
// from constructor because
|
||||
// refers to "kernel" as a global
|
||||
// from constructor because
|
||||
// refers to "kernel" as a global
|
||||
void ExecAll();
|
||||
int Exec(char* name);
|
||||
|
||||
// Todo ----
|
||||
int Exec(char* name, int priority);
|
||||
// ---------
|
||||
|
||||
void ThreadSelfTest(); // self test of threads and synchronization
|
||||
|
||||
void ConsoleTest(); // interactive console self test
|
||||
void NetworkTest(); // interactive 2-machine network test
|
||||
Thread* getThread(int threadID){return t[threadID];}
|
||||
Thread* getThread(int threadID){return t[threadID];}
|
||||
|
||||
void PrintInt(int n);
|
||||
|
||||
int CreateFile(char* filename); // fileSystem call
|
||||
|
||||
// These are public for notational convenience; really,
|
||||
// they're global variables used everywhere.
|
||||
// These are public for notational convenience; really,
|
||||
// they're global variables used everywhere.
|
||||
|
||||
Thread *currentThread; // the thread holding the CPU
|
||||
Scheduler *scheduler; // the ready list
|
||||
@@ -60,17 +63,21 @@ class Kernel {
|
||||
SynchConsoleInput *synchConsoleIn;
|
||||
SynchConsoleOutput *synchConsoleOut;
|
||||
SynchDisk *synchDisk;
|
||||
FileSystem *fileSystem;
|
||||
FileSystem *fileSystem;
|
||||
PostOfficeInput *postOfficeIn;
|
||||
PostOfficeOutput *postOfficeOut;
|
||||
FrameTable *frameTable;
|
||||
|
||||
int hostName; // machine identifier
|
||||
|
||||
private:
|
||||
|
||||
Thread* t[10];
|
||||
|
||||
// Todo ----
|
||||
char* execfile[10];
|
||||
int execPriority[10];
|
||||
// ---------
|
||||
|
||||
int execfileNum;
|
||||
int threadNum;
|
||||
bool randomSlice; // enable pseudo-random time slicing
|
||||
@@ -85,5 +92,3 @@ class Kernel {
|
||||
|
||||
|
||||
#endif // KERNEL_H
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user