public static void ResumeProcess(string Name) { PCB pcb = PCB.GetPCB(Name); if (pcb != null) { pcb.StopWaiting(); } }
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; } } } }