Example #1
0
        public static void SleepProcess(string Name)
        {
            PCB pcb = PCB.GetPCB(Name);

            if (pcb != null)
            {
                pcb.WaitForSomething();
            }
        }
Example #2
0
 public void Lock(PCB Proces)
 {
     if (Check())
     {
         proces    = Proces;
         this.Name = proces.Name;
         open      = 1;
         proces.WaitForSomething();
         Proces.InstructionCounter--;
     }
     else
     {
         waiting.Add(Proces);
         Proces.WaitForSomething();
         Proces.InstructionCounter--;
     }
 }