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

            if (pcb != null)
            {
                pcb.StopWaiting();
            }
        }
Exemple #2
0
 public void Unlock(string name)
 {
     if (!Check())
     {
         if (waiting.Count() > 0)
         {
             if (!Check(name))
             {
                 foreach (var i in waiting)
                 {
                     if (name == i.Name)
                     {
                         i.StopWaiting();
                         waiting.Remove(i);
                         break;
                     }
                 }
             }
             else
             {
                 proces.StopWaiting();
                 proces = waiting[0];
                 waiting.Remove(proces);
                 this.Name = proces.Name;
             }
         }
         else if (waiting.Count() == 0)
         {
             if (Check(name))
             {
                 proces.StopWaiting();
                 open = 0;
             }
         }
     }
 }