ProcessTable Class

Definition

Line 152 of cmsxk/Process.cm

Constructors & Destructor

static ProcessTable()
private ProcessTable()

Member Functions

public nothrow void AddProcessToExecutableINodeProcessMap(Process* process)
public nothrow void AddProcessToProcessMap(Process* process)
public nothrow Process* CloneProcess(Process* parent)
public Process* CreateProcess(const String<char>& name, ulong entryPoint, ulong textSegmentBaseAddress, ulong textSegmentSize, ulong dataSegmentSize, ulong poolSegmentSize, ulong minStackSegmentSize, ulong maxStackSegmentSize, ulong stackSegmentIncrement, int sid)
public nothrow void FreeProcess(Process* process)
public inline nothrow Process* GetIdle() const
public inline nothrow Process* GetInit() const
public inline nothrow Process* GetNextReadyProcess()
public Process* GetProcess(int pid) const
public nothrow Process* GetProcessFromExecutableINodeProcessMap(const INodeKey& executableINodeKey) const
public inline nothrow Process* GetRunning() const
public static nothrow ProcessTable& Instance()
public inline nothrow void PutToReadyQueue(Process* process)
public inline nothrow bool ReadyQueueEmpty() const
public nothrow void RemoveProcessFromExecutableINodeProcessMap(Process* process)
public inline nothrow void SetInit(Process* init_)
public inline nothrow void SetRunning(Process* running_)

Member Variables

private HashMap<INodeKey, Process*, INodeKeyHash, EqualTo<INodeKey>> executableINodeProcessMap
private Process* free
private Process idleProcess
private Process* init
private static UniquePtr<ProcessTable> instance
private Machine& machine
private int nextFreeProcessSlot
private int nextPID
private HashMap<int, Process*, Hasher<int>, EqualTo<int>> processMap
private Process[1024] processSlots
private Queue<Process*> readyQueue
private Process* running

Constructor& Destructor Details

ProcessTable Static Constructor

static ProcessTable()

Definition
Line 154 of cmsxk/Process.cm


ProcessTable Constructor

private ProcessTable()

Definition
Line 161 of cmsxk/Process.cm


Member Function Details

AddProcessToExecutableINodeProcessMap Member Function

public nothrow void AddProcessToExecutableINodeProcessMap(Process* process)

Definition
Line 310 of cmsxk/Process.cm


AddProcessToProcessMap Member Function

public nothrow void AddProcessToProcessMap(Process* process)

Definition
Line 306 of cmsxk/Process.cm


CloneProcess Member Function

public nothrow Process* CloneProcess(Process* parent)

Definition
Line 213 of cmsxk/Process.cm


CreateProcess Member Function

public Process* CreateProcess(const String<char>& name, ulong entryPoint, ulong textSegmentBaseAddress, ulong textSegmentSize, ulong dataSegmentSize, ulong poolSegmentSize, ulong minStackSegmentSize, ulong maxStackSegmentSize, ulong stackSegmentIncrement, int sid)

Definition
Line 164 of cmsxk/Process.cm


FreeProcess Member Function

public nothrow void FreeProcess(Process* process)

Definition
Line 266 of cmsxk/Process.cm


GetIdle Member Function

public inline nothrow Process* GetIdle()

Definition
Line 302 of cmsxk/Process.cm


GetInit Member Function

public inline nothrow Process* GetInit()

Definition
Line 286 of cmsxk/Process.cm


GetNextReadyProcess Member Function

public inline nothrow Process* GetNextReadyProcess()

Definition
Line 338 of cmsxk/Process.cm


GetProcess Member Function

public Process* GetProcess(int pid)

Definition
Line 274 of cmsxk/Process.cm


GetProcessFromExecutableINodeProcessMap Member Function

public nothrow Process* GetProcessFromExecutableINodeProcessMap(const INodeKey& executableINodeKey)

Definition
Line 314 of cmsxk/Process.cm


GetRunning Member Function

public inline nothrow Process* GetRunning()

Definition
Line 294 of cmsxk/Process.cm


Instance Static Member Function

public static nothrow ProcessTable& Instance()

Definition
Line 157 of cmsxk/Process.cm


PutToReadyQueue Member Function

public inline nothrow void PutToReadyQueue(Process* process)

Definition
Line 330 of cmsxk/Process.cm


ReadyQueueEmpty Member Function

public inline nothrow bool ReadyQueueEmpty()

Definition
Line 334 of cmsxk/Process.cm


RemoveProcessFromExecutableINodeProcessMap Member Function

public nothrow void RemoveProcessFromExecutableINodeProcessMap(Process* process)

Definition
Line 326 of cmsxk/Process.cm


SetInit Member Function

public inline nothrow void SetInit(Process* init_)

Definition
Line 290 of cmsxk/Process.cm


SetRunning Member Function

public inline nothrow void SetRunning(Process* running_)

Definition
Line 298 of cmsxk/Process.cm