//////////////////////////////////////////////////////////////////////////// // PROCESS.CC // //-The process class contains all the object need to run a single process // in its own address space. // // The process class contain: // -AddressSpace // -Count of threads still alive. // -OpenFile Table // -Join Information // -Page Table Location kept in the address space /////////////////////////////////////////////////////////////////////////// #include "process.h" void Process::Process(OpenFile *executable, joinable=false) { threadCount = 1; addrSpace = new AddrSpace(executable); for(int i=0; i<10;i++) openFileTable[i]=NULL; } Process::~Process(){} int Process::getThreadCount() { return threadCount; } void Process::incrementThreadCount() { threadCount = threadCount+1; } void Process::decrementThreadCount() { threadCount = threadCount - 1; } AddrSpace* Process::getSpace() { return addrSpace; }