Beispiel #1
0
 public override void Execute()
 {
     switch (Checkpoint)
     {
         case 1:
             taskSource = (TaskInSupervisorMemory) RequestResource("TaskInSupervisorMemory");
             if (taskSource == null)
             {
                 break;
             }
             Checkpoint++;
             goto case 2;
         case 2:
             if (!Parse())
             {
                 break;
             }
             else
             {
                 CreateResource(new Task(this, Resources.State.Free, "Task", taskSource, new List<string> { "Loader", "MainProc" } ));
                 State = Processes.State.Blocked;
                 break;
             }
     }
 }
Beispiel #2
0
 public Task(Process creator, State state, string id, TaskInSupervisorMemory taskSource, List<string> processList)
     : base(creator, state, id, processList)
 {
     this.taskSource = taskSource;
 }