Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 public static void CreateProcess(Process process)
 {
     ProcessList.Add(process);
     if (process.State == Processes.State.Ready || process.State == Processes.State.Active)
     {
         ReadyProcessQueue.Enqueue(process);
     }
 }
Ejemplo n.º 3
0
 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;
 }
Ejemplo n.º 4
0
 private static bool ProcessIsAlreadyAdded(Process process)
 {
     var result = Core.ReadyProcessQueue.SingleOrDefault(p => p.Id == process.Id);
     return result != null;
 }
Ejemplo n.º 5
0
 private static void PickProcess()
 {
     CurrentProcess = Core.ReadyProcessQueue.Dequeue();
        CurrentProcess.State = Processes.State.Active;
 }
Ejemplo n.º 6
0
 public JobGovernor(int priority, State state, Process parentProcess, string id)
     : base(priority, state, parentProcess, id)
 {
 }
Ejemplo n.º 7
0
 public StartStop(int priority, State state, Process parentProcess, string id)
     : base(priority, state, parentProcess, id)
 {
 }
Ejemplo n.º 8
0
 public TaskInput(Process creator, State state, string id, Queue<string> taskList, List<string> processList)
     : base(creator, state, id, processList)
 {
     Tasks = taskList;
 }
Ejemplo n.º 9
0
 public ReadIn(int priority, State state, Process parentProcess, string id)
     : base(priority, state, parentProcess, id)
 {
 }
Ejemplo n.º 10
0
 public static void DeleteProcess(Process process)
 {
     process.Delete();
     //TODO: delete from ReadyProcessQueue
 }
Ejemplo n.º 11
0
 public Interrupt(int priority, State state, Process parentProcess, string id)
     : base(priority, state, parentProcess, id)
 {
 }
Ejemplo n.º 12
0
 public InterruptInformation(Process creator, State state, string id, Type type, List<string> processList)
     : base(creator, state, id, processList)
 {
     Type = type;
 }
Ejemplo n.º 13
0
 public TaskInSupervisorMemory(Process creator, State state, string id, string[] memory, List<string> processList)
     : base(creator, state, id, processList)
 {
     Memory = memory;
 }
Ejemplo n.º 14
0
 public StartJobGovernor(Process creator, State state, Memory virtualMemory, string id, List<string> processList)
     : base(creator, state, id, processList)
 {
     VirtualMemory = virtualMemory;
 }
Ejemplo n.º 15
0
 public UserMemory(Process creator, State state, string id, List<string> processList)
     : base(creator, state, id, processList)
 {
 }
Ejemplo n.º 16
0
 public EndOfOs(Process creator, State state, string id, List<string> processList)
     : base(creator, state, id, processList)
 {
 }
Ejemplo n.º 17
0
 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);
 }
Ejemplo n.º 18
0
 public WriteOut(int priority, State state, Process parentProcess, string id)
     : base(priority, state, parentProcess, id)
 {
 }
Ejemplo n.º 19
0
 public VirtualMachine(int priority, State state, Memory virtualMemory, Process parentProcess, string id)
     : base(priority, state, parentProcess, id)
 {
     this.virtualMemory = virtualMemory;
 }
Ejemplo n.º 20
0
 public TaskParser(int priority, State state, Process parentProcess, string id)
     : base(priority, state, parentProcess, id)
 {
 }
Ejemplo n.º 21
0
 public TaskReady(Process creator, State state, Memory virtualMemory, string id, List<string> processList)
     : base(creator, state, id, processList)
 {
     VirtualMemory = virtualMemory;
 }
Ejemplo n.º 22
0
 public Task(Process creator, State state, string id, TaskInSupervisorMemory taskSource, List<string> processList)
     : base(creator, state, id, processList)
 {
     this.taskSource = taskSource;
 }