public Resource(Process creator, State state, string id, List<string> processList) { WaitingProcesses = new PriorityQueue<Process>(new ProcessComparer()); Creator = creator; State = state; Id = id; InitWaitingProcessesList(processList); }
public static void CreateProcess(Process process) { ProcessList.Add(process); if (process.State == Processes.State.Ready || process.State == Processes.State.Active) { ReadyProcessQueue.Enqueue(process); } }
public Process(int priority, State state, Process parentProcess, string id) { Id = id; Priority = priority; State = state; ParentProcess = parentProcess; CreatedProcesses = new List<Process>(); CreatedResources = new List<Resource>(); Checkpoint = 1; }
private static bool ProcessIsAlreadyAdded(Process process) { var result = Core.ReadyProcessQueue.SingleOrDefault(p => p.Id == process.Id); return result != null; }
private static void PickProcess() { CurrentProcess = Core.ReadyProcessQueue.Dequeue(); CurrentProcess.State = Processes.State.Active; }
public JobGovernor(int priority, State state, Process parentProcess, string id) : base(priority, state, parentProcess, id) { }
public StartStop(int priority, State state, Process parentProcess, string id) : base(priority, state, parentProcess, id) { }
public TaskInput(Process creator, State state, string id, Queue<string> taskList, List<string> processList) : base(creator, state, id, processList) { Tasks = taskList; }
public ReadIn(int priority, State state, Process parentProcess, string id) : base(priority, state, parentProcess, id) { }
public static void DeleteProcess(Process process) { process.Delete(); //TODO: delete from ReadyProcessQueue }
public Interrupt(int priority, State state, Process parentProcess, string id) : base(priority, state, parentProcess, id) { }
public InterruptInformation(Process creator, State state, string id, Type type, List<string> processList) : base(creator, state, id, processList) { Type = type; }
public TaskInSupervisorMemory(Process creator, State state, string id, string[] memory, List<string> processList) : base(creator, state, id, processList) { Memory = memory; }
public StartJobGovernor(Process creator, State state, Memory virtualMemory, string id, List<string> processList) : base(creator, state, id, processList) { VirtualMemory = virtualMemory; }
public UserMemory(Process creator, State state, string id, List<string> processList) : base(creator, state, id, processList) { }
public EndOfOs(Process creator, State state, string id, List<string> processList) : base(creator, state, id, processList) { }
public Loader(int priority, State state, Process parentProcess, string id) : base(priority, state, parentProcess, id) { virtualMemory = new Memory(Memory.VIRTUAL_MEMORY_BLOCK_COUNT, Memory.BLOCK_WORD_COUNT); }
public WriteOut(int priority, State state, Process parentProcess, string id) : base(priority, state, parentProcess, id) { }
public VirtualMachine(int priority, State state, Memory virtualMemory, Process parentProcess, string id) : base(priority, state, parentProcess, id) { this.virtualMemory = virtualMemory; }
public TaskParser(int priority, State state, Process parentProcess, string id) : base(priority, state, parentProcess, id) { }
public TaskReady(Process creator, State state, Memory virtualMemory, string id, List<string> processList) : base(creator, state, id, processList) { VirtualMemory = virtualMemory; }
public Task(Process creator, State state, string id, TaskInSupervisorMemory taskSource, List<string> processList) : base(creator, state, id, processList) { this.taskSource = taskSource; }